mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2003
Posts: 101
C
colt45 Offline OP
Vogon poet
OP Offline
Vogon poet
C
Joined: Nov 2003
Posts: 101
I have few channels that I'd like to be alert of something new but I'm having trouble capturing the name and echo it back to my windows.

Example.

Quote:
Chan1
<botname> Section ReleaseName Time

Chan2
<botname> .:[ ReleaseName ]:[ Section ][ Time ]:.

Chan3
<botname> Time Section ReleaseName


I can see that chan1 is $2, chan2 is $2, chan3 is $3 and so on...

What I would like is to caption only that ReleaseName and echo back into my @windows as a result something like this.

Quote:
@ReleaseName
Chan1 have just announced $2
Chan2 have just announced $2
Chan3 have just announced $3


It has been a while since I've scripted mIRC and I've lost all my scripts few years ago and have completely forgotten how to script well - so I'm starting from scratch here so I'd appreciate for someone to give me solution.

Reason why I ask, it's because I do not want to write a VERY LONG code (yes, i'm terrible at coding :p) - So I'm hoping someone have a solution to make it smaller code.

Thanks

Last edited by colt45; 07/01/18 07:37 PM.
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
It's very unlikely that chan1/chan2/chan3 would be $2/$3/$4. $numbers are space-delimited tokens, $1- is all tokens, and $0 is the count of how many tokens there are. Seems like you want something similar to:

Code:
on *:text:*:#chan1,#chan2,#chan3: {
  if (!$istok(bot1name bot2name etc , $nick , 32)) return
  aline @windowname $chan has just announced $1-
}


A token can give unexpected results if there are color codes touching the visible letters.

Joined: Nov 2003
Posts: 101
C
colt45 Offline OP
Vogon poet
OP Offline
Vogon poet
C
Joined: Nov 2003
Posts: 101
Ok, i'll give it a try and see ... will let u know if i need further help.
Thanks

I guess I'll have to do the hard way - to write longer codes as your code doesn't do what exactly I want.
Thanks

Last edited by colt45; 07/01/18 08:35 PM.

Link Copied to Clipboard