Update Chanban/chanban.tcl

This commit is contained in:
Teh PeGaSuS
2026-02-28 01:14:05 +01:00
parent dd4fc90df1
commit d1ab3a8cb5
+9 -6
View File
@@ -18,11 +18,14 @@ namespace eval cmgmt {
variable kickReason "Your behaviour is not conducive to the desired environment."
# Revenge kick
variable revengeKick "Very funny... NOT!"
variable revengeKick "Very funny... NOT"
# Temporary ban duration, in minutes
variable tBanDuration "30"
# Command to upload the file
# Be aware that we are doing `cat $filename |` so you must account for that
variable upCommand "curl -s -F file=@- https://x0.at/"
# Set the banmask to use in banning the user
# Available types are:
# 0 *!user@host
@@ -236,7 +239,7 @@ namespace eval cmgmt {
close $blist
if {[catch {
set result [exec cat $filename | curl -s -F file=@- http://hotpaste.0bin.xyz/]
set result [exec cat $filename | {*}$::cmgmt::upCommand]
} err]} {
putserv "PRIVMSG $chan :ERROR! Failed to upload ban list: \($err\)."
file delete $filename
@@ -369,7 +372,7 @@ namespace eval cmgmt {
set chan [lindex [split $text] 0]
if {![matchstr "#*" $chan]} {
putserv "PRIVMSG $nick :ERROR! Syntax: tban <#chan> <nick>"
putserv "PRIVMSG $nick :ERROR! Syntax: kick <#chan> <nick>"
return 0
}
@@ -399,7 +402,7 @@ namespace eval cmgmt {
putkick $chan $nick $::cmgmt::revengeKick
return 0
}
putkick $chan $target $::cmgmt::tBanReason
putkick $chan $target $::cmgmt::kickReason
return 0
}
@@ -441,7 +444,7 @@ namespace eval cmgmt {
}
### Banlist
proc banlist_msg {nick uhost hand chan text} {
proc banlist_msg {nick uhost hand text} {
set chan [lindex [split $text] 0]
if {![matchstr "#*" $chan]} {
@@ -489,7 +492,7 @@ namespace eval cmgmt {
close $blist
if {[catch {
set result [exec cat $filename | curl -s -F file=@- http://hotpaste.0bin.xyz/]
set result [exec cat $filename | {*}$::cmgmt::upCommand]
} err]} {
putserv "PRIVMSG $nick :ERROR! Failed to upload ban list: \($err\)."
file delete $filename