BeBot - An Anarchy Online and Age Of Conan chat automaton

Development => Coding and development discussion => Topic started by: Diablo on September 06, 2007, 08:48:32 pm

Title: Getting complete input to display
Post by: Diablo on September 06, 2007, 08:48:32 pm
Im trying to take input and assign them to two different variables as in:

Code: [Select]

if (preg_match("/^" . $this -> bot -> commpre . "fight (.+) vs (.+)/i", $msg, $arr))
$this -> bot -> send_pgroup($this -> do_fight($arr[1], $arr[2]));


What gets displays is the 2 and 3 letter of the first input (.+). The second input isnt even read. So if you put in text1 vs text2 i want to assign those to arr[1], arr[2].
Also wondering if $sender puts name of person sending command into variable?
Title: Re: Getting complete input to display
Post by: Temar on September 06, 2007, 11:09:00 pm
(.+?)

u get the person doing the command from
   function pgmsg($name, $msg)
$name = person doing command
SimplePortal 2.3.7 © 2008-2024, SimplePortal