mIRC Homepage
Posted By: ___ Notice on specific word - 10/08/04 04:44 PM
I will try to explain this as best I can. I would like a small script which will display a notice to a user if they type a certain word or phrase.

Specifically, if a user says !list - but only in one specified channel - I want to display a notice to them saying something along the lines of "this is not a file-sharing channel".

I don't know mIRC scripting very well, so I would appreciate it if someone could help me with this.

Thankyou for your time.
Posted By: TonyTheTiger Re: Notice on specific word - 10/08/04 04:49 PM
on *:TEXT:!list:#channel:notice $nick This is not a file sharing channel!

Replace #channel with your actual channel name.
Posted By: Mentality Re: Notice on specific word - 10/08/04 04:49 PM
on @*:text:!list:#channel:{ notice $nick This is not a file sharing channel }

Put this in your Remote - ALT+R. Remember to replace #channel with the channel name. You must be opped in the channel for this to work.

You may also want to read /help on text.

Regards,
Posted By: ___ Re: Notice on specific word - 10/08/04 05:26 PM
(In reply to both TonyTheTiger and Mentality)

Thankyou both very much for your help. Mentality, I notice in your version of the script, there are { } included, whereas TonyTheTiger's doesn't have them. Also, there is a @ at the beginning (I assume it relates to being opped). What are the differences between the scripts?

Many thanks again.
Posted By: Mentality Re: Notice on specific word - 10/08/04 05:48 PM
Indeed, the @ prefix means you will need to be opped in the specified channel or the script will do nothing. I usually put this, because auto-notices and the like are usually not welcome in most channels from non-ops. You can learn more about other prefixes/suffixes with /help access levels.

The help file explains the use of brackets best, see /help if then else. In this example the { } aren't really needed but it makes no difference, I simply do it out of habit.

Regards,
Posted By: GooseComics Re: Notice on specific word - 12/08/04 03:09 AM
Quote:
on @*:text:!list:#channel:{ notice $nick This is not a file sharing channel }


Along the same lines as @ as op, what if I am ! and/or @ or %. Should I just make an elseif ?
Posted By: Mentality Re: Notice on specific word - 12/08/04 03:34 AM
There is not a prefix for those rather unique channel statuses, the ! prefix has a different purpose altogether. You could use something like the following which checks what your nickname begins with (so you can check if it begins with !) and then notice the user:

on *:text:!list:#channel:{
if $nick(#,$me,!) {
notice $nick This is not a file trading channel.
}
}


Hope that helps!

Regards,
Posted By: Online Re: Notice on specific word - 12/08/04 03:49 AM
In this thread qwerty explains the advanced $nick(...) flags.
Posted By: GooseComics Re: Notice on specific word - 12/08/04 03:57 AM
Guess I didn't word it right. I am saying that I am not an @op in the channel. I am an ! which means channel admin which is over @.

! > @ > % > +

!nick
@nick
%nick
+nick
nick

Thats the way this server rates it's users status. I think I know what needs to be done, but just want to ask just to be sure.
Posted By: Mentality Re: Notice on specific word - 12/08/04 04:04 AM
If your question bears any relevance to this thread, then the snippet I gave you checks if your nick begins with a ! in the nicklist (meaning you're a channel admin) and if it DOES start with a !, then it will notice the nickname.

If it does NOT start with a ! (i.e. you are de-admin'd) then the snippet will not activate.

There is no prefix such as 'on !*:event:' for this type of status because there are so many of these statuses that are made up every month, and then lost again in the dawns of time. @ and + are on ALL IRC networks. % is supported in some aspects, because it's become very popular. Things such as !, * or ~ are unsupported bar methods such as that which is shown above. They really are unnecessary stuff put in IRCds, and purely 'vanity' features with little real practical use.

Regards,
Posted By: GooseComics Re: Notice on specific word - 12/08/04 04:08 AM
Thank you Mentality. Answered my question the first time, sorry for asking it again.
© mIRC Discussion Forums