mIRC Homepage
Posted By: Athenlayjoshr Admin Script - 18/01/15 09:24 PM
What i need help with is i have this little command and it does not work smirk
Code:

On *:text:!admin add:#:{
if ($nick == athenlayjoshr) { msg $chan $3 Has been added to admin group. $+
write -c Admins.txt
write Admins.txt $3
}
}
Posted By: westor Re: Admin Script - 18/01/15 09:49 PM
Try use this code:

Code:
ON !*:TEXT:!admin & &:#: {
  if ($nick == athenlayjoshr) {
    if ($2 == add) {
      if (!$3) { msg # ( $+ $nick $+ ): Error, Try again and enter the nickname! | return }
      if ($read(admins.txt,nw,$3)) { msg # ( $+ $nick $+ ): This nickname is already in the list! | return }
      write Admins.txt $3
      msg $chan ( $+ $nick $+ ): $3 has been added to admin group.
    }
    if ($2 == del) || ($2 == delete) || ($2 == remove) || ($2 == rem) {
      if (!$3) { msg # ( $+ $nick $+ ): Error, Try again and enter the nickname! | return }
      var %r = $read(admins.txt,nw,$3)
      var %rn = $readn
      if (!%r) { msg # ( $+ $nick $+ ): This nickname is NOT in the list! | return }
      write -dl $+ %rn Admins.txt
      msg $chan ( $+ $nick $+ ): $3 hs been deleted from the admin group.
    }
  }
}
Posted By: Athenlayjoshr Re: Admin Script - 18/01/15 09:53 PM
That worked, Now if i wanted someone to be in that list to do a command would it be
if($nick == Admins.txt)
???
Posted By: westor Re: Admin Script - 18/01/15 09:55 PM
if ($read(admins.txt,nw,$nick)) { do stuff }
Posted By: Athenlayjoshr Re: Admin Script - 18/01/15 09:57 PM
That did not work smirk
Code:

on *:text:!announce off:#drplaystation: {
if ($read(admins.txt,nw,$nick) { return }
else {
msg # $nick >Announcements are stopping in this channel.
.timer.timername off
}
}
Posted By: Athenlayjoshr Re: Admin Script - 18/01/15 10:02 PM
Wait nvm
Posted By: westor Re: Admin Script - 18/01/15 10:03 PM
Try use ! character for negative

if (!$read(admins.txt,nw,$nick)) { do stuff }
Posted By: Nillen Re: Admin Script - 18/01/15 10:31 PM
Also make sure the Parentheses match, you miss one closing ) in that script.
© mIRC Discussion Forums