mIRC Home    About    Download    Register    News    Help

Print Thread
Moderator Commands HELP! #245431 21/04/14 01:38 PM
Joined: Apr 2014
Posts: 7
R
Razreaper Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Apr 2014
Posts: 7
I am currently trying to work some of the bugs out of my bot and one issue i am having is with moderator commands.

Whenever a mod enters a mod command it works as intended but if someone who is not a mod issues the command the command still goes through but then after going through says "Sorry, you must be a mod to use this command!"

I need it where if someone who is not modded issues the command the command does NOT go through instead it just displays "Sorry, you must be a mod to use this command!"

thanks for your help and here is my script

on *:TEXT:!social:#: {
if ($nick isop #) { msg # Make sure to follow on facebook and twitter to get announcments when Razreaper goes live. https://www.facebook.com/pages/Razreaper/179770322170130?ref=hl and twitter at https://twitter.com/Razreaper89 }
else { msg # Sorry, you must be a mod to use this command! }
}

Re: Moderator Commands HELP! [Re: Razreaper] #245432 21/04/14 02:14 PM
Joined: Apr 2014
Posts: 191
B
blessing Offline
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
The code is fine. I see nothing wrong with it.

Re: Moderator Commands HELP! [Re: blessing] #245434 21/04/14 02:27 PM
Joined: Apr 2014
Posts: 7
R
Razreaper Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Apr 2014
Posts: 7
That's what i thought as well. because i used the following code as a model to work from

on *:TEXT:!hi:#: {
if ($nick isop #) { msg # Hello There! }
else { msg # Sorry you must be a mod to use this command }
}

and that code works perfect. but when I used the code for the actual command i want non-mods can post the link then they get the message saying they cant post the link.

I guess i need to check the rest of the code to make sure nothing is interfering with this section.

Re: Moderator Commands HELP! [Re: Razreaper] #245435 21/04/14 02:52 PM
Joined: Jan 2014
Posts: 55
J
jaystew Offline
Babel fish
Offline
Babel fish
J
Joined: Jan 2014
Posts: 55
The code does look correct and I've also tested it with no errors found.

If you have more code to this script it would be worth uploading the whole code within the script to see if there is something else causing the problem.


Regards

JayStew
Re: Moderator Commands HELP! [Re: jaystew] #245441 21/04/14 04:44 PM
Joined: Apr 2014
Posts: 7
R
Razreaper Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Apr 2014
Posts: 7
I got it working. I'm not quite sure how but I went back and re-wrote the whole script now it works fine.... probably just a misplaced bracket or something simple. Thanks for checking to make sure the code was correct. The help was much appreciated.

Re: Moderator Commands HELP! [Re: Razreaper] #245442 21/04/14 04:45 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Well, what you posted doesn't have a closing bracket.
Code:
if ($nick isop #) { msg # Make sure to follow on facebook and twitter to get announcments when Razreaper goes live.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Moderator Commands HELP! [Re: Nillen] #245443 21/04/14 05:21 PM
Joined: Jan 2004
Posts: 1,323
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,323
Originally Posted By: Nillen
Well, what you posted doesn't have a closing bracket.


That's only because the forum put the text on the next line. It's actually a single line (copy it into notepad or something).

Re: Moderator Commands HELP! [Re: Loki12583] #245447 21/04/14 07:07 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Ah, very true. I just skimmed over it.


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