mIRC Home    About    Download    Register    News    Help

Print Thread
#142975 20/02/06 03:34 PM
Joined: Jan 2004
Posts: 129
A
AaronL Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: Jan 2004
Posts: 129
hello all.
I've searched for $replace first, but did'nt found a answer for my question, so here goes.

in a textline i have this: wow, there goes kname
before sending this line to the channel it must replace kname with $knick
i have this sofar.

Code:
on 1:kick:#: {
  if (%kickrea == ON) { 
    set %nikaction $read($mircdirtxtfiles\kickreacties.txt)
    $replace(%nikaction, kname, $knick)
    $replace(%nikaction, sname, $nick) 
    /msg $chan 12 %nikaction
  }
}


however this shows kname instead of $knick

what do i wrong confused
Aaron


Deridio fatum
#142976 20/02/06 03:43 PM
Joined: Feb 2006
Posts: 11
H
Pikka bird
Offline
Pikka bird
H
Joined: Feb 2006
Posts: 11
on 1:kick:#: {
if (%kickrea == ON) {
set %nikaction $read($mircdirtxtfiles\kickreacties.txt)
set %nikaction $replace(%nikaction,kname,$knick,sname,$nick)
/msg $chan 12 %nikaction
}
}

You didn't saved the $replace in any variable like %nikaction in order to msg it in the channel.


The more you learn, the less you know...
#142977 20/02/06 04:29 PM
Joined: Jan 2004
Posts: 129
A
AaronL Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: Jan 2004
Posts: 129
eh.... keej, i'm feeling very dumb now blush

thank you h4z4rd for telling me

Greetz
Aaron


Deridio fatum
#142978 20/02/06 06:41 PM
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
you could also just put the identifiers in the txt so you don't have to replace them ;-]


If it ain't broken, don't fix it!
#142979 21/02/06 06:24 AM
Joined: Jan 2004
Posts: 129
A
AaronL Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: Jan 2004
Posts: 129
Very true, but bottomline is that users of that addon can add and/or remove reactions by themselves by typing it to a editbox and press the ADD button
To keep it simple they just have to make a line like:

Wow... thats great SNAME how you throwed KNAME out of the window.

Greetz
Aaron


Deridio fatum

Link Copied to Clipboard