| View previous topic :: View next topic |
| Author |
Message |
Getodacul Voice

Joined: 07 Jun 2007 Posts: 20
|
Posted: Mon Sep 22, 2008 3:36 pm Post subject: Unban last ban. |
|
|
| I need a script who can unban the last ban on !unban command(on public channel or private). My realy problem is how to make the eggdrop to know what is the last ban. |
|
| Back to top |
|
 |
smash Halfop
Joined: 31 Jul 2006 Posts: 45
|
|
| Back to top |
|
 |
Getodacul Voice

Joined: 07 Jun 2007 Posts: 20
|
Posted: Thu Sep 25, 2008 9:49 am Post subject: |
|
|
That's the script:
| Quote: |
#Note: This script works of all the channels the bot is on.
##############################################################################
##############################################################################
bind pub o "unban" unban:pub
proc unban:pub {nick uhost hand chan text} {
global botnick
if {![botisop $chan]} {
putserv "PRIVMSG $chan :I'm not opped!"
} else {
set chanbanlist [lsort -index 2 -integer -decreasing [chanbans $chan]]
set last [lindex [lindex $chanbanlist end] 0]
if {[llength $chanbanlist] > 0} {
putquick "MODE $chan -b $last"
return 0
}
}
}
putlog "Unban last ban loaded successfully." |
|
|
| Back to top |
|
 |
|