mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 4
A
aemarx Offline OP
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Dec 2002
Posts: 4
<list command> | grep something
i think this is very useful if u can do such thing like UNIX grep command.What i meant is like..

/msg NickServ listchans | grep SOp

so it will print only the line which have word 'SOp'

or,

/msg ChanServ akick #channel list | grep by aemarx

so it only print the line that have words 'by aemarx'.

i hope u ppl can understand what i meant(my english is very bad).

Joined: Jan 2003
Posts: 150
J
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 150
u can easily script this using on notice & $gettok


Go ahead, jump. 100,000 lemmings can't be wrong.
Joined: Jan 2003
Posts: 8
V
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
V
Joined: Jan 2003
Posts: 8
Adding this to mIRC would be dumb, mainly because I often say something that ends with "| grep ..." to someone as a private message.

Ask the authors of your IRC-services and have them add it to chanserv/nickserv/whatever instead.

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
A better method might be to simply script a %variable that contains match-text, and make certain events only display text that matches that string (if the %variable contains a string). When you're done, you just unset the variable and output returns to normal.

This would allow you to define exactly what information gets processed as mIRC doesn't know, for instance, when NickServ is done babbling. One of the events you'd script would be On NOTICE where ($nick == NickServ). Other events might be /WHO list or /MODE B (ban) list.

As for the piped command syntex like GREP uses, mIRC handles piped commands differently so that's automatically impossible internally, but may be possible to script (again, redefining events and commands to work with it).

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Link Copied to Clipboard