Not logged in. · Lost password · Register
Forum: PHP4You :: Scripts Anregungen, Kritik & Bugreport RSS
PHP4You BOT - Private Nachricht
Schecki #1
Member since Oct 2009 · 5 posts
Group memberships: Mitglieder
Show profile · Link to this post
Subject: PHP4You BOT - Private Nachricht
Eine kleine Funktion für den PHP4You-Bot (getestet mit v0.2), mit der man Private Nachrichten abschicken kann.

$bot->add_privmsg_hook($c . "msg", "php4youBot_msg");

function php4youBot_msg($object, $params, $prefix, $channel)
{
    global $owner;
    global $msg;

    $nick = IRC::get_nick($prefix);
    if ($nick == $owner)
    {
        $receivenick = $params;
        $object->privmsg($receivenick, "$msg");
    }
}

Mit $msg nick text erhält der User mit dem Nick "nick" nun die Nachricht "text".

Den Code würde ich aus Gründen der Übersichtlichkeit in die admin.php schreiben!
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please note the verification code from the picture into the text field next to it.
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20090606-dev, © 2003-8 by Yves Goergen
Current time: 2012-02-05, 19:54:27 (UTC +01:00)