mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2015
Posts: 10
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2015
Posts: 10
Hey, I am currently trying to make a command available for all channel moderators and a few selected other members, what I currently have is this:
Code:
on *:text:!startuptime:#: {
  if ($nick == isop) {
    set %uptimeon On 
    msg # Starting uptime. Enjoy the stream!
    set -e %uptime. [ $+ [ # ] ] $ctime
  }
  elseif ($nick == NAME) {
    set %uptimeon On 
    msg # Starting uptime. Enjoy the stream!
    set -e %uptime. [ $+ [ # ] ] $ctime
  }


However, the bot doesn't react to moderators writing !startuptime, it only reacts to the elseif people.
Am I using elseif incorrectly? Is there a bracket missing or something?

Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
if ($nick isop $chan) { stuff }

You're actually looking for a person named isop, just change the syntax a little.

Last edited by Belhifet; 16/03/15 12:00 PM.
Joined: Mar 2015
Posts: 10
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2015
Posts: 10
Ugh, I'm stupid.
Works perfectly now, thank you!


Link Copied to Clipboard