-
Notifications
You must be signed in to change notification settings - Fork 0
/
nickserv.php
49 lines (44 loc) · 1.17 KB
/
nickserv.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
* NickServ class for the NickServ auth. in many IRC networks
*
* PHP version 5
*
* @category Authentication
* @package NickServ
* @author Rico Dittrich <[email protected]>
* @copyright 2012 by the authors
* @license http://www.gnu.org/licenses/gpl-3.0.txt GPL License 3
* @version GIT:
* @link https://github.com/Ditti4/FINOd
**/
class NickServ
{
public $commands, $user, $mail, $pass, $bot;
public static $instance = null;
function __construct($user, $mail, $pass)
{
$this->commands = new commands;
$this->bot = bot::getInstance("", "", "", "", "", "", "");
$this->user = $user;
$this->mail = $mail;
$this->pass = $pass;
}
static function getInstance($user, $mail, $pass)
{
if (self::$instance == null) {
self::$instance = new self($user, $mail, $pass);
}
return self::$instance;
}
function register()
{
$this->commands->privmsg(
'NickServ', 'register ' . $this->pass . ' ' . $this->mail
);
}
function login()
{
$this->commands->privmsg('NickServ', 'identify ' . $this->pass);
}
}