mIRC Home    About    Download    Register    News    Help

Print Thread
#75075 13/03/04 02:05 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
OP Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
I used x-chat for about 1 week, just to try it out. A great feature i liked in x-chat was the word replacement one.
Whenever you typed the word hb, for example, the program would automatically replace it for Hurry Back.

This was a configurable feature, so you could adapt it for you pwn personal abreviations and setttings.

I think it would be nice to get sth like this on mIRC smile


"All we are saying is give peace a chance" -- John Lennon
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Yah, this might be a nice feature...then again I find that general IRC netiquette does not like 'Laughing Out Loud' over a simple 'lol'.

For now however, there is a simple way to script it (Taken from this page which contains further help)

Code:
on *:INPUT:*: {
  if (/* !iswm $1) {
    var %text = $reptok($1-,brb,Be Right Back,1,32)
    var %text = $reptok(%text,lol,Laughing Out Loud,1,32)
    var %text = $reptok(%text,ty,Thank You,1,32)
    msg $active %text
    halt
  }
 }
} 


Just replicate the var %text = $reptok lines, but change the acronym part to match your needs.

Hope this helps!

Regards,


Mentality/Chris
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
OP Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Its works great, thanks! smile

I agree that lol and brb are much better.. i was planning on using that to replace typos or abreviations, such as 'u' for 'you'.

Thanks for the quick response smile


"All we are saying is give peace a chance" -- John Lennon
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
You're welcome, glad I could help smile

Happy chattin'!

Regards,


Mentality/Chris
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
OP Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
It works great here, thanks again!

I was just wondering...why is this line different from the rest?

Code:
var %text = $reptok($1-,brb,Be Right Back,1,32)


I mean, why this one has $1- and the others have %test ?


"All we are saying is give peace a chance" -- John Lennon
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
The first line sets the %text variable from $1- as well as any replacments needed.
The rest need to work on the contents of %text rather than the original, or any changes made by preceding $reptoks will be lost.

Joined: Feb 2004
Posts: 714
Z
Hoopy frood
OP Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Oh, so the part
Code:
 var %text = 
will set the variable %text to anything after the = ?


"All we are saying is give peace a chance" -- John Lennon
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
yeah smile

Joined: Feb 2004
Posts: 714
Z
Hoopy frood
OP Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Oh, thats cool laugh Didnt know about that :P

much better than set %text blablabla laugh

Thanks for the help!! smile


"All we are saying is give peace a chance" -- John Lennon
Joined: Jan 2004
Posts: 4
A
Self-satisified door
Offline
Self-satisified door
A
Joined: Jan 2004
Posts: 4
u can try this one too (i donno scripting, i got this from one of my friends)

on *:INPUT:*: {
if (/* !iswm $1) {
msg $active $replace($1-,brb,Be Right Back)
halt
}
}


u have to paste this in Remotes. u can add more words next to 'Be Right Back' by using the comma. smile


AK

Link Copied to Clipboard