mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2016
Posts: 15
D
Dan Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Nov 2016
Posts: 15
Hi guys,

I'm sure maybe its quite simple , but how do you send a message to a user On Join but only for the first time they join and never again ?

Joined: Oct 2015
Posts: 112
B
Vogon poet
Offline
Vogon poet
B
Joined: Oct 2015
Posts: 112
You could just add the persons name to some kind of database when they join. Then whenever someone joins, mIRC would see if they are in that database. If they are, then don't display the message.

Joined: Nov 2016
Posts: 15
D
Dan Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Nov 2016
Posts: 15
Actually if I can just check the ignore list on JOIN then that would do it surely.... But I cant work out the code for that , I'm still learning. Anyone ?

Last edited by Dan; 15/08/17 01:05 PM.
Joined: Jan 2017
Posts: 57
Babel fish
Offline
Babel fish
Joined: Jan 2017
Posts: 57
Originally Posted By: Dan
Actually if I can just check the ignore list on JOIN then that would do it surely.... But I cant work out the code for that , I'm still learning. Anyone ?


Not sure what an ignore list is, but I can come up with an alternative. I assume you already have the "on Join" and some way to trigger an event when you get it, so here's what I'd do.

Code:
on WhateverEventThisIs:#: {
  if (!$readini(onJoin.ini,WelcomedUsers,$nick)) {
    msg $chan This is your welcome message.
    writeini onJoin.ini WelcomedUsers $nick true
  }
}


When someone joins, it'll check the list to see if they've been welcomed before. If they have already been welcomed, the if-statement fails.

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
Just thought I'd point out that you're running into the nick-vs-address issue that affects a lot of things. If someone comes into channel with their away-nick, they'll get a greeting again. If you're wanting to base it on addresses, you could great a named user-level with guser and check it $ulist. Of course that also has the problem of someone's address changing in the future.


Link Copied to Clipboard