mIRC Homepage
Posted By: Khonor Help with notify new subscriber. - 20/05/16 11:48 PM
Hi all,

Someone who can help me fix the bugs, and do to working right? From already thank you very much for any help you can give me!







on 1:TEXT:*subscribed*:#:{
if ( $nick == twitchnotify ) && ($istok($1-,subscribed to,32)) halt
inc %subs
if (%subs == 1) {
/msg # Welcome $$1 $+ ! We hope you enjoy your stay at # $+ ! [You are the 1st sub today]
} else {
/msg # Welcome $$1 $+ ! We hope you enjoy your stay at # $+ ! [You are sub %subs $+ ]
}
/msg # $1 Thank for supporting to # for $4 months! [You are the 1st re-sub today]
} else {
/msg # $1 Thank for supporting to # for $4 months! [You are re-sub %subs $+ ]
}


on *:TEXT:!sub reset:#:{
If ( $nick !isop $chan ) if ($2 != $null) /msg # $nick -> You're not a moderator in this chatroom.
%subs = 0
/msg # > Subs count has been reset to: " $+ 0 $+ ".
}


on *:TEXT:!count:#:{
/msg # - Today's sub count: " $+ %subs $+ ".
}
Posted By: Sakana Re: Help with notify new subscriber. - 21/05/16 01:33 PM
Well, what's wrong with it?

Code:
if ( $nick == twitchnotify ) && ($istok($1-,subscribed to,32)) halt


Why did you put a /halt there? That's likely your issue
Posted By: Fonic_Artes Re: Help with notify new subscriber. - 21/05/16 01:46 PM
@Sakana
The "subscribed to" is probably meant for if they host a channel so it won't trigger it.

@Khonor
That said, it's probably best to enclose that halt in brackets and change it to an OR operator on top of $nick != twitchnotify.
Code:
if ($nick != twitchnotify) || ($istok($1-,subscribed to,32)) { halt }


That should make it where if someone tries to trigger it without being "twitchnotify" and if you're hosting a channel it won't trigger the command.
© mIRC Discussion Forums