This is the new home of the egghelp.org community forum. this announcement post . Click the X in the top right-corner of this box to dismiss this message. 
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
			
		
				
			
				
								silverboy 							 
						Halfop 			
		Posts:  55 Joined:  Sat Feb 11, 2006 5:44 am
				Contact: 
				
			 
				
		 
		
						
					
													
							
						
									
						Post 
					 
								by silverboy  Mon Apr 30, 2007 4:15 am 
			
			
			
			
			
			could anyone pls get me a tcl which can suspend the username if the bot gets banned via UNDERNET Channel service bot " X "
			
			
									
						
							proxyz..proxyz...i see everywher... O_o
			
						 
		 
				
		
		 
	 
				
		
				
			
				
								DarkRaptor 							 
						Voice 			
		Posts:  36 Joined:  Sat Apr 15, 2006 2:39 amLocation:  Trois-Rivières, Qc 
		
						
					
						 
													
							
						
									
						Post 
					 
								by DarkRaptor  Mon Apr 30, 2007 2:08 pm 
			
			
			
			
			
			Try this:
Code: Select all 
bind KICK - * CService:kick:by:X:revenge
proc CService:kick:by:X:revenge { nick host hand chan target reason } {
        global botnick
        if {[nick2hand $nick] == "X" && $target == $botnick} {
                set temp1 [lindex [split [lindex [split $reason] 0] "("] 1]
                set username [lindex [split [lindex [split $temp1] 0] ")"] 0]
                putquick "PRIVMSG X :SUSPEND $chan $username 5 D"
        }
}
Note:  X must be in bot's userlist.
DarkRaptor @ irc.undernet.org
			
						 
		 
				
		
		 
	 
				
		
				
			
				
								silverboy 							 
						Halfop 			
		Posts:  55 Joined:  Sat Feb 11, 2006 5:44 am
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by silverboy  Tue May 01, 2007 12:02 am 
			
			
			
			
			
			wow... this one is nice, cud yu pls add /msg x unban $chan bot and /msg x invite chan $bot
			
			
									
						
							proxyz..proxyz...i see everywher... O_o
			
						 
		 
				
		
		 
	 
				
		
				
			
				
								DarkRaptor 							 
						Voice 			
		Posts:  36 Joined:  Sat Apr 15, 2006 2:39 amLocation:  Trois-Rivières, Qc 
		
						
					
						 
													
							
						
									
						Post 
					 
								by DarkRaptor  Tue May 01, 2007 12:40 am 
			
			
			
			
			
			Code: Select all 
bind KICK - * CService:kick:by:X:revenge
proc CService:kick:by:X:revenge { nick host hand chan target reason } {
        global botnick
        if {[nick2hand $nick] == "X" && $target == $botnick} {
                set temp1 [lindex [split [lindex [split $reason] 0] "("] 1]
                set username [lindex [split [lindex [split $temp1] 0] ")"] 0]
                putserv "PRIVMSG X :SUSPEND $chan $username 5 D"
                putserv "PRIVMSG X :UNBAN $chan $botnick"
                puthelp "PRIVMSG X :INVITE $chan"
        }
}
EDIT: Changed putquick to putserv to prevent flooding
DarkRaptor @ irc.undernet.org
			
						 
		 
				
		
		 
	 
				
		
				
			
				
								Sir_Fz 							 
						Revered One 			
		Posts:  3794 Joined:  Sun Apr 27, 2003 3:10 pmLocation:  Lebanon
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Sir_Fz  Tue May 01, 2007 7:07 am 
			
			
			
			
			
			Tips: You can use just $hand instead of [nick2hand $nick] and [isbotnick $target] instead of $target == $botnick (so you won't need $botnick anymore).
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
				
			
				
								Nor7on 							 
						Op 			
		Posts:  185 Joined:  Sat Mar 03, 2007 8:05 amLocation:  Spain - Barcelona
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Nor7on  Sun Mar 16, 2008 6:15 am 
			
			
			
			
			
			how make this: 
if an user (+o or +m) as kicked for other user, the eggdrop suspend the username kicker.
sorry for the baaaaaaaaaaaaad english lol.
Thanks  
 
		 
				
		
		 
	 
				
		
				
			
				
								Sir_Fz 							 
						Revered One 			
		Posts:  3794 Joined:  Sun Apr 27, 2003 3:10 pmLocation:  Lebanon
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Sir_Fz  Sun Mar 16, 2008 7:06 am 
			
			
			
			
			
			Try
Code: Select all 
bind KICK - * CService:kick:by:X:revenge
proc CService:kick:by:X:revenge { nick host hand chan target reason } {
 global botnick
 if {$hand == "X" && ([isbotnick $target] || [matchattr [nick2hand $target $chan] mo|mo $chan])} {
  set temp1 [lindex [split [lindex [split $reason] 0] "("] 1]
  set username [lindex [split [lindex [split $temp1] 0] ")"] 0]
  putserv "PRIVMSG X :SUSPEND $chan $username 5 D"
  putserv "PRIVMSG X :UNBAN $chan $botnick"
  puthelp "PRIVMSG X :INVITE $chan"
 }
} 
		 
				
		
		 
	 
				
		
				
			
				
								Nor7on 							 
						Op 			
		Posts:  185 Joined:  Sat Mar 03, 2007 8:05 amLocation:  Spain - Barcelona
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Nor7on  Sun Mar 16, 2008 9:44 am 
			
			
			
			
			
			hi.
the code don't work, don't send nothing.
so, sorry but this code work, but just when kicked the eggdrop.
Code: Select all 
setudef flag xkick
bind kick * * xstuff:kick
proc xstuff:kick {nick hand text chan vict reas} {
 set unicks [lindex $text 0]
  if {![isbotnick $vict] || [matchattr [nick2hand $unicks $chan] b $chan]} return
  if {[channel get $chan xkick] && $nick == "X"} {
    set kicker [string trim [lindex [split $reas] 0] {()}]
    putserv "PRIVMSG X :SUSPEND $chan $kicker 4d 100"
  }
} 
putlog "SUSPEND USERS LOADED"
this code work only when kick the eggdrop, but don't work when kick other bot.
i change the flag 
b  to flag 
o|o  but don't work too.
so something wrong ?
 
 
		 
				
		
		 
	 
				
		
				
			
				
								Sir_Fz 							 
						Revered One 			
		Posts:  3794 Joined:  Sun Apr 27, 2003 3:10 pmLocation:  Lebanon
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Sir_Fz  Sun Mar 16, 2008 3:07 pm 
			
			
			
			
			
			o|o means global or channel-specific +o user-flag and not +o channel mode (op). You need to add the users you wish to protect as +o users in your Eggdrop's userlist.
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
				
			
				
								Nor7on 							 
						Op 			
		Posts:  185 Joined:  Sat Mar 03, 2007 8:05 amLocation:  Spain - Barcelona
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Nor7on  Sun Mar 16, 2008 3:13 pm 
			
			
			
			
			
			yeah.
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
				
			
				
								Nor7on 							 
						Op 			
		Posts:  185 Joined:  Sat Mar 03, 2007 8:05 amLocation:  Spain - Barcelona
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Nor7on  Sun Mar 16, 2008 6:41 pm 
			
			
			
			
			
			i modif this.
Code: Select all 
setudef flag xkick
bind kick * * xstuff:kick
proc xstuff:kick {nick hand text chan vict reas} {
 set unicks [lindex $text 0]
	set users [nick2hand $unicks $chan] 
  if {![isbotnick $vict] || [matchattr $users o|o $chan]} return
  if {[channel get $chan xkick] && $nick == "X"} {
    set kicker [string trim [lindex [split $reas] 0] {()}]
    putserv "PRIVMSG X :SUSPEND $chan $kicker 4d 100"
  }
} 
putlog "SUSPEND USERS LOADED"
but too don't work, only work when kick the eggdrop.
Any suggestion? 
 
 
		 
				
		
		 
	 
				
		
				
			
				
								speechles 							 
						Revered One 			
		Posts:  1398 Joined:  Sat Aug 26, 2006 10:19 pmLocation:  emerald triangle, california (coastal redwoods) 
		
						
					
						 
													
							
						
									
						Post 
					 
								by speechles  Sun Mar 16, 2008 8:35 pm 
			
			
			
			
			
			
isbotnick only checks the eggdrop's nickname, not any other bots, just that single bot. To check for any bot simply check if the user has the bot flag (b) then you know it's a bot and part of the botnet.
Code: Select all 
setudef flag xkick
bind kick - * xstuff:kick
proc xstuff:kick {nick host hand chan target reason} {
  if {[channel get $chan xkick] && $nick == "X"} {
    set kicker [string trim [lindex [split $reason] 0] {()}]
    if {[matchattr [nick2hand $target $chan] b|b $chan] && [matchattr [nick2hand $kicker $chan] mo|mo $chan]} {
      putserv "PRIVMSG X :SUSPEND $chan $kicker 4d 100"
      putserv "PRIVMSG X :UNBAN $chan $target"
      if {[isbotnick $target]} {
         puthelp "PRIVMSG X :INVITE $chan"
      } else {
         puthelp "INVITE $target $chan"
      }
    }
  }
}
putlog "xstuff armed and ready for revenge."
What this does is watch all kicks made by X. If it was a bot (even an unopped bot in the bots userlist) and the person  requesting it to be kicked has +o or +m, they get suspended. Afterwards bot unbans the bot banned by the user. If the bot itself was banned, it will have X invite it back, otherwise the bot itself will invite back the banned bot.
 
		 
				
		
		 
	 
				
		
				
			
				
								Nor7on 							 
						Op 			
		Posts:  185 Joined:  Sat Mar 03, 2007 8:05 amLocation:  Spain - Barcelona
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Nor7on  Mon Mar 17, 2008 6:25 am 
			
			
			
			
			
			Thanks speechles Sir_Fz.
work now.
i modif something and that work perfect, suspend de user and put flag +d-o in channel 
thanks. 
 
		 
				
		
		 
	 
				
		
				
			
				
								Nor7on 							 
						Op 			
		Posts:  185 Joined:  Sat Mar 03, 2007 8:05 amLocation:  Spain - Barcelona
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Nor7on  Wed Mar 19, 2008 4:04 pm 
			
			
			
			
			
			a little question.
how add this in the code?
where $kickusers is the HAND of $kicker.
how add this?  
 
		 
				
		
		 
	 
				
		
				
			
				
								Sir_Fz 							 
						Revered One 			
		Posts:  3794 Joined:  Sun Apr 27, 2003 3:10 pmLocation:  Lebanon
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Sir_Fz  Wed Mar 19, 2008 4:34 pm 
			
			
			
			
			
			Code: Select all 
chattr [nick2hand $kicker $chan] |+d-o $chan