mIRC Home    About    Download    Register    News    Help

Print Thread
#245922 14/05/14 07:15 AM
P
persephone325
persephone325
P
Is there variable I can add so that only I can used certain commands as a channel owner? I can't seem to find one. The "OP" command gives mods the ability to use it as well, and I don't want that.

Any help would be much appreciated.

#245923 14/05/14 09:06 AM
P
persephone325
persephone325
P
I think I found it.

(if $nick == persephone325)

Which is my account username. Unless I'm mistaken?

#245924 14/05/14 09:15 AM
B
blessing
blessing
B
Originally Posted By: persephone325
I think I found it.

(if $nick == persephone325)

Which is my account username. Unless I'm mistaken?

brackets () is not correct.
It should be
Code:
if ($nick == persephone325) { do stuff here }

#245945 15/05/14 08:28 AM
P
persephone325
persephone325
P
I had it right in the actual coding box. I just didn't transfer it to here the right way. lol

Another quick question though. How can I make it so that only certain usernames can use a command? I have a few commands that only I can use, but there is one that I would like a specific viewer of mine to have. She's a good friend of mine. ^^

This is the code, but it won't work when she types in the command.

on *:TEXT:!nova:#: {
if ($nick == persephone325) || ($nick ==novanashi_kitsune) {
msg $chan Nova, my favorite Kitsune!! *pats her lovely head* <3 }
}

#245946 15/05/14 09:24 AM
Joined: Dec 2013
Posts: 771
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 771
Some easy ways to do it is to read off of a string, compare the value of $nick and see if the value is true.
If you're gonna have multiple users, you can use $read/$istok, they're very simple to deal with.

If you're just gonna have 2 users, your way works as well, you just need to add a space -
Quote:
($nick ==novanashi_kitsune)

P
persephone325
persephone325
P
Oh! Gotcha. I totally didn't notice there wasn't a space there. Thank you! ^^


Link Copied to Clipboard