mIRC Home    About    Download    Register    News    Help

Print Thread
#250508 18/01/15 09:24 PM
Joined: Dec 2014
Posts: 26
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Dec 2014
Posts: 26
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
}
}

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
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.
    }
  }
}


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #250510 18/01/15 09:53 PM
Joined: Dec 2014
Posts: 26
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Dec 2014
Posts: 26
That worked, Now if i wanted someone to be in that list to do a command would it be
if($nick == Admins.txt)
???

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
if ($read(admins.txt,nw,$nick)) { do stuff }


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #250512 18/01/15 09:57 PM
Joined: Dec 2014
Posts: 26
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Dec 2014
Posts: 26
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
}
}

Last edited by Athenlayjoshr; 18/01/15 09:59 PM.
Joined: Dec 2014
Posts: 26
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Dec 2014
Posts: 26
Wait nvm

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Try use ! character for negative

if (!$read(admins.txt,nw,$nick)) { do stuff }


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Also make sure the Parentheses match, you miss one closing ) in that script.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net

Link Copied to Clipboard