This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

how do i start a file of program when someone types !update

Old posts that have not been replied to for several years.
Locked
k
khano

Post by khano »

hi i want to automatically start a mircstats updater like
./pisg.pl when someone types !update

f.e. i am in channel #sixts
now when someone types !update, i want
the scripts to start ./pisg.pl which makes IRC stats and then it has to display in channel #sixth:
mIRC stats updated at http://www.somethingi.cantfigure.out.com

pls help
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

Try this:

Code: Select all

# Set the flag required to use the !update command here.
set update_setting(flag) "m|m"

# Set the path of the file to execute here.
set update_setting(exec) "./pisg.pl"

# Set the url of your stats page here.
set update_setting(msg) "mIRC stats updated at http://www.somethingi.cantfigure.out.com"

# Set the update command here.
set update_setting(cmd) "!update"

bind pub $update_setting(flag) $update_setting(cmd) pub:update
proc pub:update {nick uhost hand chan text} {
	global update_setting
	puthelp "PRIVMSG $chan :[expr {[catch {exec $update_setting(exec)} error]?"$update_setting(exec) could not be executed ([string totitle $error]).":$update_setting(msg)}]"
}
Locked