mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2004
Posts: 4
A
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Apr 2004
Posts: 4
Hi everyone. I've been searching around and I don't see anything that can do this. I want to know if it's possible to automatically send a message to someone when they connect to a certain server. Not to a channel, but to the server itself.

I have the person on notify already, and set up to do a /whois when they connect. So I know there must be a way to set it up to send them a message like "Hey check your email!" or something like that, in case they log in when I'm not around, but still connected. Anyone know of a way this can be done? And tell me how to set it up step by step cuz yes, I am new to scripting.

Thanks! smile

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Code:
on 1:NOTIFY:{
if ($nick == [color:red]your friends nick[/color]) .msg  [color:red]your friends nick[/color] Hi there m8!
}

paste that in your remote "ALT + R in mirc", be shure to change the red parts to your friends nick.. and also be shure to have him added in your notify list.. if you want to add more nicks, then just copy the line
if ($nick == your friends nick) .msg your friends nick Hi there m8!
then put it below the first one and enter another nick to it..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Apr 2004
Posts: 4
A
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Apr 2004
Posts: 4
Wow! Thanks for the incredibly fast reply. That's exactly what I wanted to do. Tested it and it works fine. Thanks a bunch smile

Joined: Apr 2004
Posts: 4
A
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Apr 2004
Posts: 4
Actually, another question if you could help me. I got it to work fine like that but what if I wanted one for another person right under it. Like...

on 1:NOTIFY: {if ($nick == dana`) .msg dana` Check your email!

that one works. But what if I wanted one for another nickname, that was on my notify list, in addition to that one? would I use the same thing but just like, change the nickname and the message and just leave everything as it is, and put it right under that first line?

Thanks!

Joined: Dec 2003
Posts: 261
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2003
Posts: 261
Hi, there. If you want this on NOTIFY to work you must have that nick in your notify list.


velicha dusha moja Gospoda
Joined: Dec 2002
Posts: 102
M
Vogon poet
Offline
Vogon poet
M
Joined: Dec 2002
Posts: 102
Code:
on 1:NOTIFY:{
  if ($nick == your friends nick) .msg  your friends nick Hi there m8!
  if ($nick == another friend) .msg $nick Hi.
  if ($nick == a third friend) || ($nick == a third friend's other nickname) .msg $nick Yer cool cuz you have two nicks.
}


-
MIMP
Joined: Apr 2004
Posts: 4
A
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Apr 2004
Posts: 4
smile Okay I did that, and it works. smile Thanks a lot everyone for your help smile

Joined: Dec 2003
Posts: 261
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2003
Posts: 261
I guess I was sleepy when I wrote that post. frown


velicha dusha moja Gospoda
Joined: Feb 2004
Posts: 21
D
Ameglian cow
Offline
Ameglian cow
D
Joined: Feb 2004
Posts: 21
I don't recommend using this kind of scripts if there is not some kind of nick registration service available. What if someone else logs in using the same nick as your friend usually does? On Notify event is a good start but nick's full address should be checked before sending automatically anything. This can be done with /who and parsing of RAW 352 (RPL_WHOREPLY) events. At the moment I'm too busy to write code for that, sorry.

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
He asked a question and we replyed to it.. smile and whats the harm in send somone the /msg read your mail ? can end up with him start to talk to the other person, and he can have a new friend.. it's diffrent if we was talking about passwords here, dont u think? smile


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Feb 2004
Posts: 21
D
Ameglian cow
Offline
Ameglian cow
D
Joined: Feb 2004
Posts: 21
Sparta: In this particular case I don't think it's a very big deal but generally we should be very careful with automatic messages. And, generally speakin, if beginner asks advanced users to write a script, the "moral responsibility" smile of an advanced user is to provide as "legal" script as possible because beginner may be unaware of such issues. I know that IRC is usually more like anarchy than lawful society, but still...

But no big deal here.

PS. Irc-servers should have better notify. They should handle full nick!user@host addresses and report changes in "away" status. Maybe one day I'll script one if servers do not develop. smile

Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
i agree with the point made that on notify will trigger even if the "wrong" person is using the nick, however i dont think i know anyone on IRC who has a static ip, dynamic IP addresses seem to be the norm so even with the full @host it might never trigger after the first time. Much better to use it when they join a channel IMO as someone using anothers nick is less likely to go to the same channels. It is true that we need to be careful about automatic messages and who we send them to.


billythekid

Link Copied to Clipboard