All pastes #955842 Raw Edit

Someone

public text v1 · immutable
#955842 ·published 2008-03-24 21:40 UTC
rendered paste body
proc pub:deluser {nick uhost hand chan args} {
	if {![auth:check $hand]} {return 0}
	set args [split [cleanarg $args]]
	 if {![info exists args] || $args == "" || $args == "{}"} {
		notice $nick "Usage: .deluser <handle>"
		return 0
	}
	if {[getting-users]} {
		notice $nick "Sorry, there is currently a userfile transfer going on. Try back in a couple of seconds."
		return 0
	}
	set who [lindex $args 0]
	set err [deluser $who]
	if {$err == 0} {
		say $chan "Attempt to remove $who failed."
		return 0
	}
	putcmdlog "<<$nick>> !$hand! deluser $who"
}