Login  
 

Klient.com > Forums > Plugins and Scripts > Scripting > finding channel name from alias proc
 
Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
technicka
Member

Registered: Jun 2003
Location: federal way, soon hawaii
Posts: 30

finding channel name from alias proc

I'm probably asking more than my fair share of questions, but you guys seem to be a wealth of knowledge.

I need to get the channel name from an alias procedure.

I need this info to be able to send to a specific server and channel at a later time from an event.

So two things:...

how do I get the current channel?

how do I send a command to a specific server and channel?

mucho thanks

__________________
"24 hours in a day, 24 beers in a case. Coincidence? I think not."
> Stephen Wright

Old Post 15 Jun 2003 06:48 AM
Click Here to See the Profile for technicka Find more posts by technicka Edit/Delete Message Reply w/Quote
jazper
Code Monkey

Registered: Sep 2002
Location: Warrensburg
Posts: 167

"how do I get the current channel?"

When you invoke an alias, you are passed the Window Object, so in the window object you have a method called Name. That holds the name of the window or channel you invoke the alias from.

Window.Name


"how do I send a command to a specific server and channel?"
Is this going to be the same server but different channel that the alias was invoked from? Because if so, you are passed the Server object in the alias as well.

So you could do:

code:
Dim objChan Set objChan = Server.ChannelByName("#test") objChan.Command "say blah" Set objChan = Nothing

Old Post 15 Jun 2003 02:52 PM
Click Here to See the Profile for jazper Find more posts by jazper Edit/Delete Message Reply w/Quote
technicka
Member

Registered: Jun 2003
Location: federal way, soon hawaii
Posts: 30

different server

no.. it won't be the same server that i'm senging the msg from. I'll be running a script and I might not even be connected to the server, or I might be.. but the active server will be different.


the rest makes sense though.. tahnks

__________________
"24 hours in a day, 24 beers in a case. Coincidence? I think not."
> Stephen Wright

Old Post 15 Jun 2003 06:31 PM
Click Here to See the Profile for technicka Find more posts by technicka Edit/Delete Message Reply w/Quote
tom
Klient Author

Registered: Sep 2002
Location: Blacksburg, Virginia, USA
Posts: 1543

> Dim objChan
> Set objChan = Server.ChannelByName("#test")
> objChan.Command "say blah"
> Set objChan = Nothing

Or, more simply... Server.ChannelByName("#test").Command "say blah"

__________________
Tom McAlee

Old Post 16 Jun 2003 06:04 AM
Click Here to See the Profile for tom Find more posts by tom Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 10:25 PM. Post New Thread    Post A Reply
 
Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread


   
Forums Engine: vBulletin 2.2.7, Copyright ©2000 - 2002, Jelsoft Enterprises Limited.
Copyright © 1997-2004, by Thomas J. McAlee, Jr. All rights reserved. Terms of Use.