mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
test.ini looks like this

Code:
[KICK]
reason=hi $nick $+ , I want you to go away! Kicked on $date $+ !


Code:
alias test {
  .signal -n signalkick Johnny $active
}

on *:SIGNAL:signalkick:{
  kick $2 $1 $readini(test.ini, KICK, reason)
}


but when it kicks how can i make the $nick in the reason show as the actual nickname its kicking? and also how to get the other identifiers to work properly like the $+ and the $date

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
$readini evaluates identifiers anyway unless you use the 'n' flag, so the only thing you have to change is $nick to $1 in your ini file.

Change the line in your ini file to read:

Code:
[KICK]
reason=hi $1, I want you to go away! Kicked on $date $+ !


Then your code will work as-is.

Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
thanks hixxy ill check it out, would it also evaualte vars, for e.g

on *:SIGNAL:signalkick:{
var %chan = $2, %nick = $1
kick %chan %nick $readini(test.ini, KICK, reason)
}

[KICK]
reason=hi %nick $+ , I want you to go away! Kicked on $date $+ !

would that work as well?

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Why not try it and see!


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
As Starbucks said, try it yourself. You know exactly how to try it and find out so why bother asking here and waiting for a reply..

Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
sorry, i asked that incase it wouldnt work anyway, and it didn't so can anyone help me get it working with vars please?

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Works fine on my end.

Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
hixxy, its kicks, but it doesnt show the name or the date stuff, it just kicks with this reason


hi , I want you to go away! Kicked on !

Last edited by pouncer; 30/09/07 09:35 PM.
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Strange. It's obviously evaluating $date otherwise $date would appear in the text. Are you using the same code as before in your ini file?

Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Try this to see if it will trigger date,

//echo -a $readini(test.ini,KICK,reason)

if it still doesn't return the date try

//echo -a $date

too see if it returns the date for you, ,it be might be an evaluation conflict somewhere in your script.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Link Copied to Clipboard