Skip to content

Instantly share code, notes, and snippets.

@Zoddo
Zoddo / os_raw.cpp
Last active January 3, 2016 14:18
/os raw command for Anope 2.0 - DANGEROUS COMMAND!
#include "module.h"
class CommandOsRaw : public Command
{
public:
CommandOsRaw(Module *creator, const Anope::string &sname = "operserv/raw") : Command(creator, sname, 0, 0)
{
this->SetDesc(_("Send a raw command to the uplink server - \037DANGEROUS!\037"));
this->SetSyntax("\037<pseudoclient>\037 \037<command>\037");
this->SetSyntax(":\037<command>\037");
<?php
include 'vendor/autoload.php';
$config = new \Zoddo\irc\Config('irc.ekinetirc.fr.nf', 'TestPhpIrc');
//$config->setPort(6697)
// ->setSsl();
$connection = new \Zoddo\irc\IrcConnection($config);
$connection->getEvent()->addListener('ping', array(new \Zoddo\irc\EventListener\PingResponder(), 'onPing'));