This is a simple script for PITC v1.0 that adds /slap to PITC when loaded.
Loading
Place the contents of this snippet in scripts/slap.php then type /load scripts/slap.php in PITC
Usage
Type /slap NICK to slap that nick in the current channel.
PITC
This script demonstrates interacting with the currently active window and adding a command
to do a simple task.
<?php
$api->addCommand("slap","slap_funct");
function slap_funct($irc) {
global $api;
if (isset($irc['1'])) {
if ($irc['active'] != "Status") {
$api->action($irc['active'],"slaps ".$irc['1']." with a PITC shaped trout");
}
}
else {
$api->pecho(" = Usage: /slap NICK =",$irc['active']);
}
}
?>