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.

Stop rejoin when kicked

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
t
toxicpc
Voice
Posts: 16
Joined: Sun Feb 24, 2008 7:47 am

Stop rejoin when kicked

Post by toxicpc »

How can I stop my bot from rejoining a channel that it is kicked from?

I have searched the forums and read conf file but I cant find an option to stop it.

Thanks for help
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Well, it's actually designed to join a channel that it has been placed in. One would expect it would not be kicked anyway; if so, as per any other user on IRC, it would rejoin.

Editing the source or finding a scripting solution may be your choices.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Re: Stop rejoin when kicked

Post by iamdeath »

toxicpc wrote:How can I stop my bot from rejoining a channel that it is kicked from?
Try this code:

Code: Select all

bind kick - * bot:kick
proc bot:kick {nick uhost hand chan target reason} {
global botnick
     if {$target != $botnick} {return 0}
     channel set $chan +inactive
}
If the bot is kicked, this code will make that channel +inactive and then to make it rejoin, you will have to type this in your DCC:

Code: Select all

.chanset #Channel -inactive
Hope this will solve your problem.

peace
death
|AmDeAtH @ Undernet
Death is only the *Beginning*...
t
toxicpc
Voice
Posts: 16
Joined: Sun Feb 24, 2008 7:47 am

Post by toxicpc »

ok Thanks for the answers. The problem was im using Metroid's request script but if people don't want the bot in their channel anymore they have to ban it.

I will try that piece of code iamdeath, thanks :D
t
toxicpc
Voice
Posts: 16
Joined: Sun Feb 24, 2008 7:47 am

Post by toxicpc »

I have tried the code but I cant get it to work, when starting the eggdrop it gives this error:


[07:36] Tcl error in file 'l5.conf':
[07:36] missing close-brace
while executing
"proc bot:kick {nick uhost hand chan target reason} {
global botnick
if {$target != $botnick} {return 0}
channel set $chan +inactive"
(file "scripts/noautorejoin.tcl" line 2)
invoked from within
"source scripts/noautorejoin.tcl"
(file "l5.conf" line 1319)
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

Did you place a } on the next line after the channel set line, as in iamdeath's example?
t
toxicpc
Voice
Posts: 16
Joined: Sun Feb 24, 2008 7:47 am

Post by toxicpc »

Nope i didnt, that was the problem. Thanks :D
Post Reply