mIRC Home    About    Download    Register    News    Help

Topic Options
#93531 - 10/08/04 05:44 PM Notice on specific word
___ Offline
Pikka bird

Registered: 17/06/03
Posts: 15
Loc: The United Kingdom of Great Br...
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.

Top
#93532 - 10/08/04 05:49 PM Re: Notice on specific word
TonyTheTiger Offline
Vogon poet

Registered: 03/02/04
Posts: 124
on *:TEXT:!list:#channel:notice $nick This is not a file sharing channel!

Replace #channel with your actual channel name.


Edited by TonyTheTiger (10/08/04 05:50 PM)

Top
#93533 - 10/08/04 05:49 PM Re: Notice on specific word
Mentality Offline
Planetary brain

Registered: 01/06/03
Posts: 5024
Loc: London, England
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,
_________________________
Mentality/Chris

Top
#93534 - 10/08/04 06:26 PM Re: Notice on specific word
___ Offline
Pikka bird

Registered: 17/06/03
Posts: 15
Loc: The United Kingdom of Great Br...
(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.


Edited by ___ (10/08/04 06:26 PM)

Top
#93535 - 10/08/04 06:48 PM Re: Notice on specific word
Mentality Offline
Planetary brain

Registered: 01/06/03
Posts: 5024
Loc: London, England
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,
_________________________
Mentality/Chris

Top
#93536 - 12/08/04 04:09 AM Re: Notice on specific word
GooseComics Offline
Self-satisified door

Registered: 06/07/04
Posts: 4
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 ?

Top
#93537 - 12/08/04 04:34 AM Re: Notice on specific word
Mentality Offline
Planetary brain

Registered: 01/06/03
Posts: 5024
Loc: London, England
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,
_________________________
Mentality/Chris

Top
#93538 - 12/08/04 04:49 AM Re: Notice on specific word
Online Offline
Hoopy frood

Registered: 09/12/02
Posts: 1922
In this thread qwerty explains the advanced $nick(...) flags.

Top
#93539 - 12/08/04 04:57 AM Re: Notice on specific word
GooseComics Offline
Self-satisified door

Registered: 06/07/04
Posts: 4
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.

Top
#93540 - 12/08/04 05:04 AM Re: Notice on specific word
Mentality Offline
Planetary brain

Registered: 01/06/03
Posts: 5024
Loc: London, England
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,
_________________________
Mentality/Chris

Top
#93541 - 12/08/04 05:08 AM Re: Notice on specific word
GooseComics Offline
Self-satisified door

Registered: 06/07/04
Posts: 4
Thank you Mentality. Answered my question the first time, sorry for asking it again.

Top