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.

/msg $botnick ban

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
N
Ni0
Voice
Posts: 13
Joined: Mon Dec 12, 2005 11:17 am

/msg $botnick ban

Post by Ni0 »

Hello can anyone help me,and tell me how it's possible to do

/msg $botnick +ban #channel *@host.domain reason here

and the same with -ban command.


Edited Thanks .
Last edited by Ni0 on Mon Jun 26, 2006 7:46 pm, edited 1 time in total.
p
phab
Voice
Posts: 12
Joined: Mon Aug 22, 2005 6:34 am

Post by phab »

Where should the bot know from, which channel the user should get banned? Or do you want a global ban on eggdrop?
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

just use any script that uses public commands, rebind to msg, cut off the channel and submit it as an argument to the public trigger :D.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
N
Ni0
Voice
Posts: 13
Joined: Mon Dec 12, 2005 11:17 am

Post by Ni0 »

Code: Select all

unbind msg o|o +ban *msg:+ban;
bind msg o|o +ban msg:+ban;

proc msg:+ban {handle idx arg} {
 if {$arg == ""} {
  *msg:+ban $handle $idx $arg
  return 0
 }
 set date [strftime %d/%m/%y]
 set defr "Banned without reason"
 set host [lindex [split $arg] 0]
 if {[string first # [set c [lindex [split $arg] 1]]] == 0} {
  if {[string first % [set t [lindex [split $arg] 2]]] == 0} {
   if {[set r [join [lrange [split $arg] 3 end]]] == ""} {
    set r $defr
   }
   *msg:+ban $handle $idx "$host $c $t $handle:\002 $r"
  }
 } {
  if {[string first % [set t [lindex [split $arg] 1]]] == 0} {
   if {[set r [join [lrange [split $arg] 2 end]]] == ""} {
    set r $defr
   }
   *msg:+ban $handle $idx "$host $t $handle:\002 $r"
  } {
   if {[set r [join [lrange [split $arg] 1 end]]] == ""} {
    set r $defr
   }
   *msg:+ban $handle $idx "$host $handle:\002 $r"
  }
 }
}

Can anyone give me a little help to make it work on private message.
Post Reply