This commit is contained in:
		
							parent
							
								
									b753bb235d
								
							
						
					
					
						commit
						71ab3b52ec
					
				
					 8 changed files with 36 additions and 10 deletions
				
			
		|  | @ -166,6 +166,15 @@ pub fn update_client(connection: &mut Telnet, parameters: ParameterList) -> Resu | |||
|     commands::clientupdate(connection, parameters) | ||||
| } | ||||
| 
 | ||||
| pub fn send_text_message(connection: &mut Telnet, target: SendTextMessageTarget, msg: String) -> Result<Response, String> { | ||||
|     commands::sendtextmessage(connection, target, msg) | ||||
| } | ||||
| pub fn send_text_message(connection: &mut Telnet, target: SendTextMessageTarget, msg: String, poke: bool) -> Result<Response, String> { | ||||
|     if poke { | ||||
|         if let SendTextMessageTarget::Client(client) = target { | ||||
|             return commands::clientpoke(connection, client.clid, msg); | ||||
|         } else { | ||||
|             return Err(String::from("Poke can only be sent to clients.")); | ||||
|         } | ||||
|     } | ||||
|     else { | ||||
|         commands::sendtextmessage(connection, target, msg) | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue