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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
TheOuch
Voice
Posts: 2 Joined: Mon Oct 15, 2007 1:34 pm
Post
by TheOuch » Mon Oct 15, 2007 1:36 pm
I've been looking for something to do this simple task, but have been unable to find anything.
Basically, I want a script that sits in #oldchannel. When anyone joins, it kicks them, and invites them to chat in #newchannel. Neither channel is invite only.
We're trying to change channel names.
So -- does anything like this exist? If not, would it be easier to implement in eggdrop's tcl, or should I just run a quick iirc bot to do it?
Any help would be appreciated!
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Mon Oct 15, 2007 4:04 pm
Code: Select all
set redirect(old_chan) [list #oldchannel]; # Note put the channel name here in lowercase!
set redirect(new_chan) [list #newchannel]
bind JOIN -|- * redirect:join
proc redirect:join {nickname hostname handle channel} {
global redirect;
if {[matchattr $handle n|n $channel]} {
return 0;
}
if {[lsearch -exact $redirect(old_chan) [string tolower $channel]]} {
putserv "KICK $channel $nickname :Please join $redirect(new_chan), you will recieve an invite."
putserv "INVITE $nickname $redirect(new_chan)"
}
}
TheOuch
Voice
Posts: 2 Joined: Mon Oct 15, 2007 1:34 pm
Post
by TheOuch » Tue Oct 16, 2007 4:06 pm
What does that matchattr section do:
Code: Select all
if {[matchattr $handle n|n $channel]} {
return 0;
}
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Tue Oct 16, 2007 8:11 pm
TheOuch wrote: What does that matchattr section do:
Code: Select all
if {[matchattr $handle n|n $channel]} {
return 0;
}
Use the following via the Command Console:
n - owner (user has absolute control over the bot)
...
n - owner (user is a channel owner)
Eggdrop Command Reference
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM