Details are in the 5 comment lines at the top of the script
Staff Commands:
!remove <bantype (1-5)>
!answer
!nicklist
User Commands:
!ask
Author: Rolo @ #mIRC on PurpleSurge
;Help Relay Script created by Rolo @ #mircscript on Purplesurge
;Meant for use on a Help Channel that this bot has Operator status on
;Help Channel should ideally be abandoned aside from users coming in for help.
;A seperate Staff Channel should be used for answering questions (obviously where staff hang out)
;Bot should be on both channels
on 1:load:{
if (!%helpnet) set %helpnet $$?="Help Network:"
if (!%helpchan) set %helpchan $$?="Help Channel:"
if (!%staffchan) set %staffchan $$?="Staff Channel:"
echo 4 -st Help Relay Script Loaded
}
on *:connect: if ($network == %helpnet) join %helpchan,%staffchan
on *:text:!ask *:%helpchan:{
if ($network == %helpnet) {
if ($nick isreg %helpchan) .msg %staffchan $nick asked: $+(",$2-,")
else .notice $nick You are a staff member.
}
}
on *:text:*:%staffchan:{
if ($network == %helpnet) {
if ($1 == !help) .notice $nick !answer !remove !nicklist
if ($1 == !answer) {
if ($2 ison %helpchan) && ($2 != $me) {
.msg %helpchan $nick answers $+($2,:,$chr(32),",$3-,")
.notice $2 If this answered your question, please /part %helpchan
}
else .notice $nick Usage: !answer <nickname> <answer>
}
if ($1 == !remove) {
if ($me isop %helpchan) {
if ($2 ison %helpchan) && ($3 isnum 1-5) && ($4 isnum) && ($2 !ison %staffchan) ban -ku $+ $4 %helpchan $2 $3 $5-
else .notice $nick Usage: !remove <nickname> <bantype (1-5)> <seconds to unban> <reason>
}
else .msg %staffchan I require chanops on %helpchan for that command.
}
if ($1 == !nicklist) .msg %staffchan $regsubex($str(-,$nick(%helpchan,0,r)),/(.)/g,$+($nick(%helpchan,\n,r),$chr(32))
}
}
or you can get rid of
if ($1 == !nicklist) {
var %x 1
while (%x <= $nick(%helpchan,0,r)) {
set %nicks %nicks $nick(%helpchan,%x,r)
inc %x
}
.msg %staffchan %nicks
unset %nicks
}
an just use somthing like this.
if ($1 == !nicklist) { .msg %staffchan $regsubex($str(-,$nick(%helpchan,0,r)),/(.)/g,$+($nick(%helpchan,\n,r),$chr(32)) }