This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Admin script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
e
elite23q
Voice
Posts: 4
Joined: Fri Nov 02, 2007 6:53 pm

Admin script

Post by elite23q »

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 :)
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Code: Select all

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.
Post Reply