mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2013
Posts: 43
G
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Jun 2013
Posts: 43
Hi, I recently tried transfering my bot over from Twitch.tv to Hitbox.tv but my Moderator only commands don't seem to work (they only work for channel owners and not moderators).

For example, this is the code:

Code:
on *:TEXT:test:#:{
  if ($nick isop #) {
    msg $chan You are a moderator! 
  }
  else { msg $chan This command is only available to moderators. }
}


When in IRC, the channel owners appear as "@GamingTom", the mods appear as "%GamingTom" and the normal users just appear as "GamingTom".

How would I got as to getting some command that only work for Owners and some that work for both Owners and Moderators? Any help would be greatly appreciated. Many thanks!

-Tom

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
@ is an op status
% is an halfop status

Code:
if ($nick isop #) { do owner stuff }
elseif ($nick ishop #) { do mod stuff }
else { do normal stuff }
if (($nick isop #) || ($nick ishop #)) { do mod and owner stuff }


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jun 2013
Posts: 43
G
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Jun 2013
Posts: 43
Wow, thanks for that! I tried "if ($nick ishalfop)" but never thought to try "ishop".
Thank you so much.

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Use the helpfiles for reference: /help if
Originally Posted By: Helpfiles
ison nickname v1 is on channel v2
isop nickname v1 is an op on channel v2
ishop nickname v1 is a halfop on channel v2
isvoice nickname v1 has a voice on channel v2
isreg nickname v1 is a normal nick on channel v2
ischan if v1 is a channel which you are on.
isban if v1 is a banned address in internal ban list on channel v2
isinvite if v1 is on the invite list of channel v2
isexcept if v1 is on the except list of channel v2
isaop if v1 is a user in your auto-op list for channel v2 (v2 optional)
isavoice if v1 is a user in your auto-voice list for channel v2 (v2 optional)
isignore if v1 is a user in your ignore list with the ignore switch v2 (v2 optional)
isprotect if v1 is a user in your protect list for channel v2 (v2 optional)
isnotify if v1 is a user in your notify list.


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

Link Copied to Clipboard