projects
/
PHP-P10.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
34baaf6
)
support for multi-target notices ("multicast")
author
pk910
<philipp@zoelle1.de>
Tue, 16 Aug 2011 01:47:59 +0000
(
03:47
+0200)
committer
pk910
<philipp@zoelle1.de>
Tue, 16 Aug 2011 01:47:59 +0000
(
03:47
+0200)
Uplink/Uplink.class.php
patch
|
blob
|
history
diff --git
a/Uplink/Uplink.class.php
b/Uplink/Uplink.class.php
index a5cc2eb74e710831bd2cc1d0d6e8a59cca400d11..e2c2c03cbef4ddb3c538c26682cccfcbc8bb049b 100644
(file)
--- a/
Uplink/Uplink.class.php
+++ b/
Uplink/Uplink.class.php
@@
-521,7
+521,7
@@
class Uplink {
private function recv_privmsg($from, $args) {
$user = P10_User::getUserByNum($from);
if($user == null) {
private function recv_privmsg($from, $args) {
$user = P10_User::getUserByNum($from);
if($user == null) {
- trigger_error("Server tries to send a privmsg from an user that does not exist or was not found on recv_privmsg.", E_USER_
ERROR
);
+ trigger_error("Server tries to send a privmsg from an user that does not exist or was not found on recv_privmsg.", E_USER_
WARNING
);
return;
}
if($this->eventHandler) {
return;
}
if($this->eventHandler) {
@@
-538,10
+538,13
@@
class Uplink {
$this->eventHandler->event_chanctcp($user, $channel, strtoupper($ctcpexp[0]), (count($ctcpexp) > 1 ? $ctcpexp[1] : null));
} else
$this->eventHandler->event_chanmessage($user, $channel, $args[1]);
$this->eventHandler->event_chanctcp($user, $channel, strtoupper($ctcpexp[0]), (count($ctcpexp) > 1 ? $ctcpexp[1] : null));
} else
$this->eventHandler->event_chanmessage($user, $channel, $args[1]);
+ } else if($args[0][0] == "$") {
+ //"multicast"
+ $this->eventHandler->event_privmessage($user, NULL, $args[1]);
} else {
$targetUser = P10_User::getUserByNum($args[0]);
if($targetUser == null) {
} else {
$targetUser = P10_User::getUserByNum($args[0]);
if($targetUser == null) {
- trigger_error("Server tries to send a privmsg to an user that does not exist or was not found on recv_privmsg.", E_USER_
ERROR
);
+ trigger_error("Server tries to send a privmsg to an user that does not exist or was not found on recv_privmsg.", E_USER_
WARNING
);
return;
}
if(strlen($args[1]) > 0 && $args[1][0] == "\001") {
return;
}
if(strlen($args[1]) > 0 && $args[1][0] == "\001") {
@@
-560,7
+563,7
@@
class Uplink {
private function recv_notice($from, $args) {
$user = P10_User::getUserByNum($from);
if($user == null) {
private function recv_notice($from, $args) {
$user = P10_User::getUserByNum($from);
if($user == null) {
- trigger_error("Server tries to send a notice from an user that does not exist or was not found on recv_notice.", E_USER_
ERROR
);
+ trigger_error("Server tries to send a notice from an user that does not exist or was not found on recv_notice.", E_USER_
WARNING
);
return;
}
if($this->eventHandler) {
return;
}
if($this->eventHandler) {
@@
-577,10
+580,13
@@
class Uplink {
$this->eventHandler->event_chanctcpreply($user, $channel, strtoupper($ctcpexp[0]), (count($ctcpexp) > 1 ? $ctcpexp[1] : null));
} else
$this->eventHandler->event_channotice($user, $channel, $args[1]);
$this->eventHandler->event_chanctcpreply($user, $channel, strtoupper($ctcpexp[0]), (count($ctcpexp) > 1 ? $ctcpexp[1] : null));
} else
$this->eventHandler->event_channotice($user, $channel, $args[1]);
+ } else if($args[0][0] == "$") {
+ //"multicast"
+ $this->eventHandler->event_privnotice($user, NULL, $args[1]);
} else {
$targetUser = P10_User::getUserByNum($args[0]);
if($targetUser == null) {
} else {
$targetUser = P10_User::getUserByNum($args[0]);
if($targetUser == null) {
- trigger_error("Server tries to send a notice to an user that does not exist or was not found on recv_notice.", E_USER_
ERROR
);
+ trigger_error("Server tries to send a notice to an user that does not exist or was not found on recv_notice.", E_USER_
WARNING
);
return;
}
if(strlen($args[1]) > 0 && $args[1][0] == "\001") {
return;
}
if(strlen($args[1]) > 0 && $args[1][0] == "\001") {