| View previous topic :: View next topic |
| Author |
Message |
elite23q Voice
Joined: 02 Nov 2007 Posts: 4
|
Posted: Fri Nov 02, 2007 6:56 pm Post subject: Admin script |
|
|
I simply want a script that does the following
Joins channels when in #X by typing .join #channel
Parts channels when in #X by typing .part #channel
Thanks  |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Fri Nov 02, 2007 10:06 pm Post subject: |
|
|
| Code: |
bind dcc n part part_chan
proc part_chan {hand idx text} {
set text [split $text]
if {([botonchan $text]) && ([validchan $text])} {
channel set $text +inactive
putcmdlog "Bot setting channel +inactive and leaving $text by $hand 's command."
} else {
putdcc $idx "I'm not ON channel $text"
return
}
}
bind dcc n join join_chan
proc join_chan {hand idx text} {
set text [split $text]
if {(![botonchan $text]) && ([validchan $text])} {
channel set $text -inactive
putcmdlog "Bot setting channel -inactive and rejoining $text by $hand 's command."
} else {
putdcc $idx "That's not a valid channel..."
return
}
}
|
Note that the channels have to already exist in the bot's channel file for the above to work. It wouldn't be that much harder to make the script add the channels if you want it to join new ones. Check the eggdrop docs for how to add new channels. |
|
| Back to top |
|
 |
|