mIRC Home    About    Download    Register    News    Help

Print Thread
On Join message to user one time only ? #261196 15/08/17 11:16 AM
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 ?

Re: On Join message to user one time only ? [Re: Dan] #261197 15/08/17 11:32 AM
Joined: Oct 2015
Posts: 112
B
Blas Offline
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.

Re: On Join message to user one time only ? [Re: Blas] #261198 15/08/17 11:37 AM
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.
Re: On Join message to user one time only ? [Re: Dan] #261209 17/08/17 03:51 AM
Joined: Jan 2017
Posts: 57
KubosKube Offline
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.

Re: On Join message to user one time only ? [Re: KubosKube] #261210 17/08/17 04:22 AM
Joined: Jan 2004
Posts: 1,410
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,410
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.