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.

Disable rejoin

Old posts that have not been replied to for several years.
Locked
E
EL3CTRO

Disable rejoin

Post by EL3CTRO »

Is there any way I can disable my eggdrop from re-joining the channel when it gets kicked? Or even better, a way to make it rejoin after say, 5 minutes has passed?
User avatar
duofruo
Halfop
Posts: 94
Joined: Thu Oct 23, 2003 3:17 pm
Location: Ploiesti@.ro
Contact:

Post by duofruo »

I think u make a tcl script
Embrace The Inevitable
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

duofruo wrote:I think u make a tcl script
state answers how to solve this, not "i'm starfing, what shoud i do ? - Eat something!"

@ electro : have a look at the TCL-Commands.doc and check for the kick bind

check every kick, if the kicked nick == $::botnick -> channel set $channel +inactive
User avatar
duofruo
Halfop
Posts: 94
Joined: Thu Oct 23, 2003 3:17 pm
Location: Ploiesti@.ro
Contact:

Post by duofruo »

GodOfSuicide wrote: state answers how to solve this, not "i'm starfing, what shoud i do ? - Eat something!"
Hmzz, ok , why u must be so ruff whith me ? I am new :(
Embrace The Inevitable
E
EL3CTRO

Post by EL3CTRO »

Thanks, I'll have a fiddle around with it.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

bind kick - * my:kick

proc my:kick {nick uhost hand chan vict reas} { 
  if {[strlwr $vict] != [strlwr $::botnick]} {
    return
  } 
  channel set $chan +inactive
  timer 5 [list channel set $chan -inactive]
}
Once the game is over, the king and the pawn go back in the same box.
E
EL3CTRO

Post by EL3CTRO »

Thanks caesar thats great, theres just one little problem though.. when it's kicked the bot rejoins the channel then leaves immediately

* Bot was kicked by EL3CTRO (EL3CTRO)
* Bot (~Bot@*****) has joined #channel
* Bot (~Bot@*****) has left #channel

Which is kinda defeating the point that I want the script for, any ideas how to remedy this?
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

This is kind of tricky... The only solution I could come up with is to override the built in kick binds and make the bot think it left the channel on purpose when setting the channel +inactive... This code is untested...good luck getting it to work :P

Code: Select all

unbind raw - KICK *raw:KICK
unbind raw - KICK *raw:irc:kick
bind raw - KICK my:raw:kick

proc my:raw:kick {f k a} {
	scan $a "%s %s" chan nick
	if {[isbotnick $nick]&&[validchan $chan]} {
		channel set $chan +inactive
		utimer 0 [list *raw:irc:part $::botname PART :$chan]
		timer 5 [list channel set $chan -inactive]
		return 1
	} {
		*raw:irc:kick $f $k $a
		*raw:KICK $f $k $a
	}
}
Have you ever read "The Manual"?
Locked