bind pub - !emerge msg_who
proc msg_who {nick uhost hand channel args} {
putlog "WHO request from $nick has been receved!"
if { [catch {set msg [exec -- emerge -s |egrep "*|available|Size" ]} ]} {
putserv "PRIVMSG $channel :Nothing Matched Your Search"
} else {
putserv "PRIVMSG $channel :Search results are as follows."
set msg [split $msg "\n"]
foreach line $msg { putserv "PRIVMSG $channel :$line" }
putserv "PRIVMSG $channel :Search Finished."
}
return 0
}
Now thats all fine and dandy (it doesn't work i know) but i want it to be able use "!emerge xmms" for eample and PM the user who did the command, and show him all the results. or add something to where i can change it to either send it to the channel or the person. this way i have the option. the problem is i don't uderstand how to use arguements. cause if you do "!emerge xmms" and then someone does "!emerge mozilla" hows it know what to search for? thats where the arguemtn comes in to play. Anyway any help with this would be great thanks in advance. my email is dilema@phreaker.net or you can find me on irc.freenode.net in the channel #w00t tryin to get this script to come to life...thanks again
