alias top {
if ($active !ischan) { echo -sac own This command can only be used on a channel. | return }
if ($1 == -v) { if ($chan($active).topic) topic $active | else { echo -sac own No topic. } }
elseif ($1 == -r && $nick($active,$me,~&@) && $chan($active).topic) {
if ($?!="Are you sure you want to remove the channel topic?") { topic -r $active }
}
elseif ($nick($active,$me,~&@)) {
var %newtopic $$?="Enter your channel topic:"
if ($?!="Are you sure you want to change the channel topic?") { topic $active %newtopic }
}
}