mIRC Home    About    Download    Register    News    Help

Print Thread
Private message on join not working #255433 22/10/15 05:56 PM
Joined: Feb 2015
Posts: 7
joseluupp Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Feb 2015
Posts: 7
What can be wrong?

Code:
ON *:JOIN:#:{
  IF ($nick !isop # && $nick !isvoice # ) {
    if (%sig < $ctime) {
      msg $nick Hellooooooooooooo
      %sig = $ctime + 29
    }
  }


Thank you so much guys!

Re: Private message on join not working [Re: joseluupp] #255434 22/10/15 06:12 PM
Joined: Nov 2014
Posts: 26
N
nexux Offline
Ameglian cow
Offline
Ameglian cow
N
Joined: Nov 2014
Posts: 26
Try this

Code:
ON *:JOIN:*:{ 
  /query $nick Hellooooooo
}

Re: Private message on join not working [Re: joseluupp] #255435 22/10/15 06:13 PM
Joined: Feb 2015
Posts: 243
O
OrFeAsGr Offline
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
Code:
ON *:JOIN:#:{
;should be
ON *:JOIN:#: {

You missed a space here!


Code:
IF ($nick !isop # && $nick !isvoice # ) {
;You need to  close the parenthesis and open one after the &&
IF ($nick !isop #) && ($nick !isvoice #) {

Also i think you wanna add 29 seconds to $ctime but for that you need $calc and also you must give a value to %sig before checking for it.
And you miss one closing bracket }
So the final code will be:
Code:
ON *:JOIN:#: {
  IF ($nick !isop #) && ($nick !isvoice #) {
%sig = $calc($ctime + 29)
    if (%sig < $ctime) {
      msg $nick Hellooooooooooooo
      %sig = $ctime + 29
    }
  }
}

But.. if you add 29 seconds to $ctime .. %sig will not be less than $ctime .. So it wont trigger. What was your goal?
I hope i helped smile

Last edited by OrFeAsGr; 22/10/15 06:13 PM.
Re: Private message on join not working [Re: OrFeAsGr] #255437 22/10/15 08:27 PM
Joined: Jan 2004
Posts: 1,330
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,330
The only thing logically wrong is that %sig must exist before the comparison is made; spacing, parentheses, and simple arithmetic without $calc are not incorrect.