mIRC Home    About    Download    Register    News    Help

Print Thread
#93531 10/08/04 04:44 PM
Joined: Jun 2003
Posts: 15
___ Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Jun 2003
Posts: 15
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.

#93532 10/08/04 04:49 PM
Joined: Feb 2004
Posts: 124
T
Vogon poet
Offline
Vogon poet
T
Joined: Feb 2004
Posts: 124
on *:TEXT:!list:#channel:notice $nick This is not a file sharing channel!

Replace #channel with your actual channel name.

Last edited by TonyTheTiger; 10/08/04 04:50 PM.
#93533 10/08/04 04:49 PM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
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
#93534 10/08/04 05:26 PM
Joined: Jun 2003
Posts: 15
___ Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Jun 2003
Posts: 15
(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.

Last edited by ___; 10/08/04 05:26 PM.
#93535 10/08/04 05:48 PM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
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
#93536 12/08/04 03:09 AM
Joined: Jul 2004
Posts: 4
G
Self-satisified door
Offline
Self-satisified door
G
Joined: Jul 2004
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 ?

#93537 12/08/04 03:34 AM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
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
#93538 12/08/04 03:49 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
In this thread qwerty explains the advanced $nick(...) flags.

#93539 12/08/04 03:57 AM
Joined: Jul 2004
Posts: 4
G
Self-satisified door
Offline
Self-satisified door
G
Joined: Jul 2004
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.

#93540 12/08/04 04:04 AM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
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
#93541 12/08/04 04:08 AM
Joined: Jul 2004
Posts: 4
G
Self-satisified door
Offline
Self-satisified door
G
Joined: Jul 2004
Posts: 4
Thank you Mentality. Answered my question the first time, sorry for asking it again.


Link Copied to Clipboard