alias stop_user {
var %nick[quit] = $gettok($1,2,58)
var %hash[quit] = $gettok($1,3,58)
.if ($hget(%hash[quit],channel)) {
var %quit[loop] = 0
.hdel $hget(%hash[quit],channel) $1
while (%quit[loop] < $hget($hget(%hash[quit],channel),0).item) {
.inc %quit[loop]
.if ($1 == $2) {
.sockwrite -n $hget($hget(%hash[quit],channel),%quit[loop]).item : $+ %nick[quit] $+ ! $+ $hget(%hash[quit],ident) $+ @ $+ $sock($1).ip QUIT : $+ $3-
}
.else {
.sockwrite -n $hget($hget(%hash[quit],channel),%quit[loop]).item : $+ %nick[quit] $+ ! $+ $hget(%hash[quit],ident) $+ @ $+ $sock($1).ip QUIT :QUIT: $2-
}
}
.hdel %hash[quit] channel
.hfree %hash[quit]
.sockclose $1
.halt
}
.halt
}