⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 commands.php

📁 flashget43的源代码 一个比较常用的下载程序
💻 PHP
📖 第 1 页 / 共 3 页
字号:
								}
							} else {

								$stmt = new Statement("UPDATE {$GLOBALS['fc_config']['db']['pref']}bans SET created=NOW() WHERE banneduserid=?");
								$stmt->process($who_userid);
							}

							return 'ok';
						}

						if($irc_cmd == '/unban' && $role_admin) {
							$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));

							$type = 'nbanu';
							$this->sendToUser($who_userid, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $msg_txt, $this->color));
			
							$stmt = new Statement("DELETE FROM {$GLOBALS['fc_config']['db']['pref']}bans WHERE banneduserid=?");
							$stmt->process($who_userid);

							return 'ok';
						}

						if($irc_cmd == '/move' && $role_admin) {
							$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));

							$stmt = new Statement("SELECT * FROM {$GLOBALS['fc_config']['db']['pref']}rooms WHERE id=?");
							$rs = $stmt->process($this->roomid);
							$room = $rs->next();

							if(!$room['ispublic']) $this->sendToUser($who_userid, new Message('adr', null, $this->roomid, $room['name']));

							$this->sendToAll(new Message('mvu', $who_userid, $this->roomid, $msg));

							$stmt = new Statement("UPDATE {$GLOBALS['fc_config']['db']['pref']}connections SET updated=NOW(), roomid=? WHERE id=?");
							$stmt->process($this->roomid, $who_id);

							return 'ok';
						}

						if($irc_cmd == '/unignore') {
							$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));

							$type = 'nignu';
							$this->sendToUser($who_userid, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $msg_txt, $this->color));
			
							$stmt = new Statement("DELETE FROM {$GLOBALS['fc_config']['db']['pref']}ignors WHERE userid=? AND ignoreduserid=?");
							$stmt->process($this->userid, $who_userid);

							return 'ok';
						}

						if($irc_cmd == '/msg' || $irc_cmd == '/query') {
							$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));

							if($irc_cmd == '/msg') $txt = $msg_txt; else $txt = '';
							$this->sendToUser($who_userid, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
							return 'ok';
						}
						if($who_ip) {
							$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
							$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $who_ip, $this->color));
							if($irc_cmd == '/who') return 'ok';
						}
						if(substr($irc_cmd, 0, 4) == '/who') {
							if(!$who_ip) $this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
							$this->doRequestUserProfileText($who_userid);
							return 'ok';
						}
					}
				}
//start fix nr 1 for not displaying bad IRC commands and also all available IRC commands when /? or /help

         if(substr($txt, 0, 2) == '/?' || substr($txt, 0, 5) == '/help') {
            if( !$role_admin || (substr($txt, 0, 5) == '/?all' || substr($txt, 0, 8) == '/helpall') ) {
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>User Commands are:</b>';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>Announcing availability:</b>';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/away</b> Sets user as away. Typing this command again sets user as "here".';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/here</b> Sets user as here. This reverses the "away" and "busy" states.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/busy</b> Sets user as busy. Typing this command again sets user as "here".';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>Managing messages:</b>';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/back &lt;number&gt;</b> Shows the last &lt;number&gt; of entries of the rooms chat.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/backtime &lt;minutes&gt;</b> Shows the last &lt;minutes&gt; of the rooms chat.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/clear</b> Clears the chat screen. This only affects your screen, not the screen of other users.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/me &lt;action&gt;</b> Issues an IRC-like "action" to the chat.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/msg &lt;user&gt; &lt;message&gt;</b> Initiates a PM with &lt;user&gt; and fills PM box with optional &lt;message&gt;.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/query &lt;user&gt;</b> Initiates a PM with &lt;user&gt;';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>Accessing rooms:</b>';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/join &lt;room&gt;</b> Switches the user to &lt;room&gt;. For example: "/join The Lounge"';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/part</b> Logout of the chat.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/quit</b> Logout of the chat.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/logout</b> Logout of the chat.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>Managing users:</b>';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/ignore &lt;user&gt;</b> Ignores PMs from &lt;user&gt;.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/invite &lt;user&gt;</b> Invites &lt;user&gt; to the room that you are currently in.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/names</b> Shows a list of all user names in all public rooms';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/showignores</b> Shows a list of users ignored by you and which other users are ignoring you.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/sos &lt;message&gt;</b> Alerts moderator in current room or all moderators. &lt;message&gt; is optional.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/unignore &lt;user&gt; &lt;message&gt;</b> Removes your ignore of &lt;user&gt; with optional &lt;message&gt; to user.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/who &lt;user&gt;</b> Profile page popup for &lt;user&gt;. If you are &lt;user&gt; login information is added.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/whois &lt;user&gt;</b> Profile page popup for &lt;user&gt; where &lt;user&gt; must be logged in to the chat.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/whowas &lt;user&gt;</b> Profile page popup for any registered &lt;user&gt;.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>Other:</b>';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/motd</b> Displays the Message of the Day.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/topic</b> Shows the topic or welcome message for the room you are in, if any.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/version</b> Shows which version of the chat you are using.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/welcome</b> Same as /topic.';
								$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
				}

				if($role_admin) {
					$txt = '<b>Moderator Commands are:</b>';
					$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/kick</b> user <b>/boot</b> user <b>/ban</b> user <b>/banip</b> user <b>/gagX</b> user <b>/ungag</b> user <b>/broadcast</b> message';
					$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/alert</b> user message <b>/roomalert</b> message <b>/chatalert</b> message';
					$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/showbans</b>&nbsp;<b>/unban</b> user <b>/reban</b> user <b>/reban</b> @ <b>/rooms</b>&nbsp;<b>/who</b> user <b>/whois</b> user <b>/names</b>';
					$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/kickout</b> user <b>/kickout</b> @ <b>/kickroom</b>&nbsp;<b>/move</b> user <b>/status</b>';
					$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/motd</b>&nbsp;<b>/motd</b> @ <b>/motd</b> [new message] <b>/?all</b>&nbsp;<b>/helpall</b>';
					$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '<b>/addbot</b> botname <b>/startbot</b> botname <b>/killbot</b> botname <b>/showbots</b>';
				    $this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
  				    $txt = '<b>/teach</b> "botname" "phrase" => "response" <b>/unteach</b> "botname" "phrase" => "response" ';
 				    $this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
				}

				if($GLOBALS['fc_config']['disabledIRC']) {
					$txt = '<b>Some IRC commands are disabled:</b>';
					$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
					$txt = '/' . str_replace ( ',', ' /', $GLOBALS['fc_config']['disabledIRC']);
					$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
				}

				return 'ok';
			}

			if(substr($txt, 0, 1) == '/') {
				$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
				$txt = 'Warning ! Only IRC subset can be used (Type /? or /help for list of IRC commands)';
				$this->sendToUser(null, new Message($type, $this->userid, $GLOBALS['fc_config']['liveSupportMode']?$this->roomid:null, $txt, $this->color));
				return 'ok';
			}
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -