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.

Unban last ban.

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
User avatar
Getodacul
Voice
Posts: 20
Joined: Thu Jun 07, 2007 2:32 pm

Unban last ban.

Post by Getodacul »

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.
s
smash
Halfop
Posts: 45
Joined: Mon Jul 31, 2006 12:33 pm

Post by smash »

quakenet #fraguk www.fraguk.com
hosting 113 scripts @ this time!
User avatar
Getodacul
Voice
Posts: 20
Joined: Thu Jun 07, 2007 2:32 pm

Post by Getodacul »

That's the script:
#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."
Post Reply