i made a php script to retrieve data from my site and print it in irc and works brilliant, but only prob is when a user uses the command it will get the data and put it in irc but if they do it in another channel my eggdrop bot is in it prints it in the channel set in the php script....
just wondering if there is an option to add summet to the tcl script so only if you have ops on irc u can use it
here is the tcl script
Code: Select all
package require http
bind pub - !stats stats
proc stats {n u h c a} {
set nick [lindex [split $a] 0]
if {$nick!=""} {
putquick "PRIVMSG #channelname Retrieving Data.... Please Wait..."
set data [::http::geturl http://www.sitename.net/ircstats.php?search=$nick]
foreach line [split [::http::data $data] \n] {
putquick "PRIVMSG #channelname Data Retrieval Complete."
putquick "PRIVMSG #channelname $line"
}
::http::cleanup $data
}
}