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.

Channel Change (Bot kick +invite to new channel)

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
T
TheOuch
Voice
Posts: 2
Joined: Mon Oct 15, 2007 1:34 pm

Channel Change (Bot kick +invite to new channel)

Post by TheOuch »

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!
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

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)"
  }
}
T
TheOuch
Voice
Posts: 2
Joined: Mon Oct 15, 2007 1:34 pm

Post by TheOuch »

What does that matchattr section do:

Code: Select all

  if {[matchattr $handle n|n $channel]} {
    return 0;
  }
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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:

Code: Select all

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