Slap [PITC v1.0]

By TMFKSOFT on Sep 25, 2012

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']);
    }
}
?>

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.