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 

Stop rejoin when kicked

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


Joined: 24 Feb 2008
Posts: 16

PostPosted: Mon Mar 03, 2008 1:54 pm    Post subject: Stop rejoin when kicked Reply with quote

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
View user's profile Send private message
Alchera
Revered One


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

PostPosted: Mon Mar 03, 2008 9:31 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Tue Mar 04, 2008 2:23 am    Post subject: Re: Stop rejoin when kicked Reply with quote

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
View user's profile Send private message Visit poster's website
toxicpc
Voice


Joined: 24 Feb 2008
Posts: 16

PostPosted: Tue Mar 04, 2008 3:30 am    Post subject: Reply with quote

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 Very Happy
Back to top
View user's profile Send private message
toxicpc
Voice


Joined: 24 Feb 2008
Posts: 16

PostPosted: Tue Mar 04, 2008 3:44 am    Post subject: Reply with quote

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


Joined: 07 Oct 2002
Posts: 708

PostPosted: Tue Mar 04, 2008 3:49 am    Post subject: Reply with quote

Did you place a } on the next line after the channel set line, as in iamdeath's example?
Back to top
View user's profile Send private message Visit poster's website
toxicpc
Voice


Joined: 24 Feb 2008
Posts: 16

PostPosted: Tue Mar 04, 2008 4:14 am    Post subject: Reply with quote

Nope i didnt, that was the problem. Thanks Very Happy
Back to top
View user's profile Send private message
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