egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Channel Change (Bot kick +invite to new channel)

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
TheOuch
Voice


Joined: 15 Oct 2007
Posts: 2

PostPosted: Mon Oct 15, 2007 1:36 pm    Post subject: Channel Change (Bot kick +invite to new channel) Reply with quote

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
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Mon Oct 15, 2007 4:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
TheOuch
Voice


Joined: 15 Oct 2007
Posts: 2

PostPosted: Tue Oct 16, 2007 4:06 pm    Post subject: Reply with quote

What does that matchattr section do:

Code:
  if {[matchattr $handle n|n $channel]} {
    return 0;
  }
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue Oct 16, 2007 8:11 pm    Post subject: Reply with quote

TheOuch wrote:
What does that matchattr section do:

Code:
  if {[matchattr $handle n|n $channel]} {
    return 0;
  }

Use the following via the Command Console:
Code:
.help whois

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber