-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.php
More file actions
executable file
·30 lines (26 loc) · 946 Bytes
/
Copy pathtest.php
File metadata and controls
executable file
·30 lines (26 loc) · 946 Bytes
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
<?php
/*
* (с) 2018 Грибов Павел
* http://грибовы.рф *
* Если исходный код найден в сети - значит лицензия GPL v.3 *
* В противном случае - код собственность ГК Яртелесервис, Мультистрим, Телесервис, Телесервис плюс *
*/
include_once 'irc_class.php';
$irc=new Tirc('куацку.ышгапрукшгпк.ru',6667,true);
$irc->connect();
$irc->SetNick("padlopavel");
$irc->User("padlopavel");
$irc->send("JOIN :#tviinet\r\n");
$irc->listChans();
$irc->loop("OnMessage");
$irc->disconnect();
function OnMessage($msg){
global $irc;
var_dump($msg);
if(strstr($msg,"PRIVMSG")){
//получаю кто прислал сообщение?
$ma= explode("!",$msg);
$user= str_replace(":", "", $ma[0]);
$irc->sendmessage("$user","Hello $user!");
};
};