| View previous topic :: View next topic |
| Author |
Message |
toxicpc Voice
Joined: 24 Feb 2008 Posts: 16
|
Posted: Mon Mar 03, 2008 1:54 pm Post subject: Stop rejoin when kicked |
|
|
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 |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Mon Mar 03, 2008 9:31 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Tue Mar 04, 2008 2:23 am Post subject: Re: Stop rejoin when kicked |
|
|
| toxicpc wrote: | How can I stop my bot from rejoining a channel that it is kicked from?
|
Try this code:
| Code: | 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: | | .chanset #Channel -inactive |
Hope this will solve your problem.
peace
death _________________ |AmDeAtH @ Undernet
Death is only the *Beginning*... |
|
| Back to top |
|
 |
toxicpc Voice
Joined: 24 Feb 2008 Posts: 16
|
Posted: Tue Mar 04, 2008 3:30 am Post subject: |
|
|
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  |
|
| Back to top |
|
 |
toxicpc Voice
Joined: 24 Feb 2008 Posts: 16
|
Posted: Tue Mar 04, 2008 3:44 am Post subject: |
|
|
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) |
|
| Back to top |
|
 |
strikelight Owner

Joined: 07 Oct 2002 Posts: 708
|
Posted: Tue Mar 04, 2008 3:49 am Post subject: |
|
|
| Did you place a } on the next line after the channel set line, as in iamdeath's example? |
|
| Back to top |
|
 |
toxicpc Voice
Joined: 24 Feb 2008 Posts: 16
|
Posted: Tue Mar 04, 2008 4:14 am Post subject: |
|
|
Nope i didnt, that was the problem. Thanks  |
|
| Back to top |
|
 |
|