function nsident($user, $whom, $msg) { global $nspass, $debugchan; if (get_nick($user) == "NS") { if ("This nickname is owned by someone else" == $msg) { msg("NS", "identify {$nspass}"); irclog("NS", "Trying to identify myself"); msg($debugchan, "trying to id"); } elseif ("Password accepted - you are now recognized" == $msg) { irclog("NS", "Identification successful, yuppie!"); if ($debug == "on") { msg($debugchan, "Identification successful: yuppie!"); } msg("CS", "op all"); } elseif ("Password Incorrect" == $msg) { irclog("NS", "Identification failed: wrong password"); if ($debug == "on") { msg($debugchan, "Identification failed: wrong password"); } } } }
echo empty($values->w_s_d) ? 'cd-movie' : 'cd-picture'; ?> "> </div> <div class="cd-timeline-content"> <h2 class='<?php echo empty($values->w_s_d) ? 'invalid' : ''; ?> '>服务中心返回到门店</h2> <span class="cd-date">时间:<?php echo $values->w_s_d; ?> </span> <span class="cd-date">操作:<?php echo get_nick($values->w_s_u); ?> </span> </div> </div> <div class="cd-timeline-block"> <div class="cd-timeline-img <?php echo empty($values->receive_d) ? 'cd-movie' : 'cd-picture'; ?> "> </div> <div class="cd-timeline-content"> <h2 class='<?php echo empty($values->receive_d) ? 'invalid' : ''; ?>
echo $data->m_w_d; ?> </span> <span class='b_user'>处理人员:<?php echo get_nick($data->m_w_u); ?> </span> <?php if (!empty($data->w_s_d)) { ?> <span class='a_time'>返回门店:<?php echo $data->w_s_d; ?> </span> <span class='a_user'>处理人员:<?php echo get_nick($data->w_s_u); ?> </span> <?php } ?> </div> <?php if (empty($data->receive_d)) { ?> <div class="progress-bar progress-bar-dim" style="width: 25%"> <span>尚未返回门店</span> <?php } else { ?> <div class="progress-bar progress-bar-success" style="width: 25%">
function pubcmd($user, $whom, $msg) { global $bnick, $version; $params = explode(" ", $msg); if (ereg("^#", $whom)) { // if they're calling the bot in a channel $mecalled = array_shift($params); // getting bots nick out } else { // private msg to the bot $mecalled = $bnick; $whom = get_nick($user); } $command = strtoupper(array_shift($params)); if ($mecalled == $bnick) { switch ($command) { case "SERVER": msg($whom, "I'm using " . ircserver()); break; case "PING": dump("NOTICE {$whom} :PING " . implode(" ", $params)); break; case "VERSION": dump("NOTICE " . get_nick($user) . " :VERSION {$version} "); break; default: if (is_admin($user)) { switch ($command) { case "JOIN": call_user_func_array('jchan', $params); break; case "PART": part($params[0]); break; case "ACTION": action($whom, join(" ", $params)); break; case "DO": dump(join(" ", $params)); break; case "BINDINGS": msg($whom, "BINDINGS for {$params['0']} -> (" . join(",", managebindings('list', $params[0])) . ")"); break; case "REHASH": msg($whom, "rehashing..."); //rehash(); break; case "QUIT": irclog("cmd", "ressurect requested by " . get_nick($user)); quit("requested by " . get_nick($user)); break; case "DIE": quit("requested by " . get_nick($user)); irclog("cmd", "die request by " . get_nick($user)); exit; break; case "MYSQL": $query = implode(" ", $params); jmysql($query); break; default: msg($whom, "Not implemented... yet!"); break; } } break; } } }
function push_message($link, $connection_id, $channel, $message, $incoming = false, $message_type = MSGT_PRIVMSG, $from_nick = false) { if (!$message) { return false; } $incoming = bool_to_sql_bool($incoming); if ($channel != "---") { $my_nick = get_nick($link, $connection_id); } else { $my_nick = "---"; } if ($from_nick) { $my_nick = $from_nick; } //$message = db_escape_string($message); $result = db_query($link, "INSERT INTO ttirc_messages \n\t\t\t(incoming, connection_id, channel, sender, message, message_type) VALUES\n\t\t\t({$incoming}, {$connection_id}, '{$channel}', '{$my_nick}', '{$message}', \n\t\t\t'{$message_type}')"); }
function is_admin($user) { global $badmins; return in_array(get_nick($user), $badmins); }