Esempio n. 1
0
 /**
  * We hook into PRIVMSG to record activity.
  */
 public function event_privmsg()
 {
     if (!Dog::isTriggered()) {
         if (false !== Dog::getUser()) {
             Dog_Seen::record(Dog::getUser(), Dog::getChannel(), 'privmsg', $this->msg());
         }
     }
 }
Esempio n. 2
0
 public function event_privmsg()
 {
     if (!Dog::isTriggered() && $this->collectorEnabled()) {
         $user = Dog::getUser();
         if (preg_match_all('#(https?://[^\\ ]+)#D', $this->msg(), $matches)) {
             array_shift($matches);
             foreach ($matches as $match) {
                 $this->onAdd($user, $match[0]);
             }
         }
     }
 }
Esempio n. 3
0
 public function event_privmsg()
 {
     $msg = $this->msg();
     if (Dog::isTriggered()) {
         if (preg_match('/^([a-z]{2})-([a-z]{2})$/', substr($msg, 1, 5), $l)) {
             if (!self::hasLanguage($l[1])) {
                 $this->rply('err_srv');
             } elseif (!self::hasLanguage($l[2])) {
                 $this->rply('err_dst');
             } else {
                 self::translate($l[1], $l[2], substr($msg, 6));
             }
         }
     }
 }
Esempio n. 4
0
 public function event_privmsg()
 {
     if (Dog::isTriggered()) {
         $this->onTryAutoLogin();
     }
 }