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 

ban bot via x
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
silverboy
Halfop


Joined: 11 Feb 2006
Posts: 55

PostPosted: Mon Apr 30, 2007 4:15 am    Post subject: ban bot via x Reply with quote

could anyone pls get me a tcl which can suspend the username if the bot gets banned via UNDERNET Channel service bot " X "

when the bot get banned via X it shud /msg x suspend #chan username 5 d
_________________
proxyz..proxyz...i see everywher... O_o
Back to top
View user's profile Send private message Visit poster's website
DarkRaptor
Voice


Joined: 15 Apr 2006
Posts: 36
Location: Trois-Rivières, Qc

PostPosted: Mon Apr 30, 2007 2:08 pm    Post subject: Reply with quote

Try this:

Code:

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
Back to top
View user's profile Send private message
silverboy
Halfop


Joined: 11 Feb 2006
Posts: 55

PostPosted: Tue May 01, 2007 12:02 am    Post subject: Reply with quote

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


Joined: 15 Apr 2006
Posts: 36
Location: Trois-Rivières, Qc

PostPosted: Tue May 01, 2007 12:40 am    Post subject: Reply with quote

Code:

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
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Tue May 01, 2007 7:07 am    Post subject: Reply with quote

Tips: You can use just $hand instead of [nick2hand $nick] and [isbotnick $target] instead of $target == $botnick (so you won't need $botnick anymore).
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Sun Mar 16, 2008 6:15 am    Post subject: Reply with quote

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 Wink
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Mar 16, 2008 7:06 am    Post subject: Reply with quote

Try
Code:
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"
 }
}

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Sun Mar 16, 2008 9:44 am    Post subject: Reply with quote

hi.

the code don't work, don't send nothing.

so, sorry but this code work, but just when kicked the eggdrop.


Code:

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 ?

Wink
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Mar 16, 2008 3:07 pm    Post subject: Reply with quote

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.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Sun Mar 16, 2008 3:13 pm    Post subject: Reply with quote

yeah.

i tested with a user (flag o) but don't work.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Sun Mar 16, 2008 6:41 pm    Post subject: Reply with quote

i modif this.

Code:

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?

Confused
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Sun Mar 16, 2008 8:35 pm    Post subject: Reply with quote

Code:
if {![isbotnick $vict]...

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:
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.
Back to top
View user's profile Send private message
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Mon Mar 17, 2008 6:25 am    Post subject: Reply with quote

Thanks speechles Sir_Fz.

work now.

i modif something and that work perfect, suspend de user and put flag +d-o in channel Wink

thanks. Smile

Wink
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Wed Mar 19, 2008 4:04 pm    Post subject: Reply with quote

a little question.

how add this in the code?


Code:
chattr $kickusers |+d-o $chan


where $kickusers is the HAND of $kicker.

how add this? Surprised
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Mar 19, 2008 4:34 pm    Post subject: Reply with quote

Code:
chattr [nick2hand $kicker $chan] |+d-o $chan

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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