| View previous topic :: View next topic |
| Author |
Message |
Ni0 Voice
Joined: 12 Dec 2005 Posts: 13
|
Posted: Mon Jun 26, 2006 5:39 pm Post subject: /msg $botnick ban |
|
|
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 |
|
| Back to top |
|
 |
phab Voice
Joined: 22 Aug 2005 Posts: 12
|
Posted: Mon Jun 26, 2006 6:14 pm Post subject: |
|
|
| Where should the bot know from, which channel the user should get banned? Or do you want a global ban on eggdrop? |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Tue Jun 27, 2006 3:43 am Post subject: |
|
|
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 . _________________ 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... |
|
| Back to top |
|
 |
Ni0 Voice
Joined: 12 Dec 2005 Posts: 13
|
Posted: Fri Jun 30, 2006 8:34 am Post subject: |
|
|
| Code: | 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. |
|
| Back to top |
|
 |
|