r1ch.net forums
* Home Help Search Login Register
r1ch.net  |  r1ch.net stuff  |  Bitchbot  |  Topic: bot ignores |'s
Pages: [1]
Print
Author Topic: bot ignores |'s  (Read 6394 times)
Black Mage
Guest
« on: March 11, 2004, 04:00:02 pm »

it seems that when the bot is splitting raw text into bits (username, command, text etc) it drops all |'s
this may be why polls are broken

seems like the problem is on line 593
$mtext = substr($line,index($line,":",index($line,":")+1)+1) ;
Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #1 on: April 02, 2004, 06:49:22 am »

Yup yup, fixed in the 1.0.3 whenever it gets around to being polished up Smiley.
Logged
nano
Member

Posts: 3


« Reply #2 on: July 28, 2004, 01:11:35 pm »

how did you fix it?  and when will 1.0.3 be out?
Logged
Anonymous
Guest
« Reply #3 on: August 11, 2004, 03:21:43 pm »

Here's what I did to fix it: in the poll code, near the heading VOTE POLL THING, I changed
Code:
 $polltopic = substr($text,10,index($text,"|")-11);
  $pollchoices = substr($text,index($text,"|")-1);
  @polloptions = split(/\|/,$pollchoices);


to:

Code:

  $polltopic = substr($text,10,index($text,":")-11);
  $pollchoices = substr($text,index($text,":")-1);
  @polloptions = split(/\:/,$pollchoices);


That means you can use colon rather than pipe to separate the choices:

Quote
startpoll topic : option1 : option2 : etc


...so it means your q's and a's can't have colons - I'm pretty sure that's all I did, and the poll appears to work fine.

The 'missing parameter' help text needs to be altered too.
Logged
Pages: [1]
Print
r1ch.net  |  r1ch.net stuff  |  Bitchbot  |  Topic: bot ignores |'s
Jump to:  

Powered by SMF 1.1.19 | SMF © 2013, Simple Machines