| View previous topic :: View next topic |
| Author |
Message |
TheOuch Voice
Joined: 15 Oct 2007 Posts: 2
|
Posted: Mon Oct 15, 2007 1:36 pm Post subject: Channel Change (Bot kick +invite to new channel) |
|
|
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! |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Mon Oct 15, 2007 4:04 pm Post subject: |
|
|
| Code: | 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)"
}
} |
|
|
| Back to top |
|
 |
TheOuch Voice
Joined: 15 Oct 2007 Posts: 2
|
Posted: Tue Oct 16, 2007 4:06 pm Post subject: |
|
|
What does that matchattr section do:
| Code: | if {[matchattr $handle n|n $channel]} {
return 0;
} |
|
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Oct 16, 2007 8:11 pm Post subject: |
|
|
| TheOuch wrote: | What does that matchattr section do:
| Code: | if {[matchattr $handle n|n $channel]} {
return 0;
} |
|
Use the following via the Command Console:
| Quote: | 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 |
|
| Back to top |
|
 |
|