|
| Author |
Message |
ChEzMoNkEy Newbie

Joined: 04 Dec 2003 Posts: 28
   
|
Posted: Thu Jan 01, 2004 3:21 am Post subject: |
|
|
basically, if i type something that my bot doesnt recognise.. it sends the reply, with nothing in it... so for example
| Quote: | Ollie [...i miss you love] says: .chat OwencY :: Website being created :: New MSNBOT says:
|
any ideas how to stop this? |
|
| Back to top |
|
 |
Cheatsfp Member

Joined: 30 Dec 2003 Posts: 109
   
|
Posted: Thu Jan 01, 2004 3:24 am Post subject: |
|
|
Hm...
What bot are you using.... WierdBot...etc.?
 |
|
| Back to top |
|
 |
ChEzMoNkEy Newbie

Joined: 04 Dec 2003 Posts: 28
   
|
Posted: Thu Jan 01, 2004 3:25 am Post subject: |
|
|
| tbh, i cant really remember, wiredbots i think :unsure: |
|
| Back to top |
|
 |
Nate God Like

Joined: 12 Nov 2003 Posts: 553
    
|
Posted: Thu Jan 01, 2004 3:32 am Post subject: |
|
|
| Unless you removed the comments at the top of any of the bot's PL files, you'd know if it was WiredBots, they make it quite obvious in their header comments. :blink: |
|
| Back to top |
|
 |
ChEzMoNkEy Newbie

Joined: 04 Dec 2003 Posts: 28
   
|
Posted: Thu Jan 01, 2004 3:47 am Post subject: |
|
|
| Quote: | ############################### # # A simple bot template. With a few commands and anti net jargon (eg changes ty to thankyou) # # Too add responces.. add them in one of the files (eg 010 main.cfg) in the responces directory # # Please read the comments if you want to learn, they will help! # ############################### # # Please fill in your bot's account information and password below # # Please fill in YOUR account (admin) below the bot username and password # ###############################
|
havent touched anything... any ideas?
EDIT yes its wiredbots  |
|
| Back to top |
|
 |
Keenie Almost An Agent

Joined: 31 Oct 2003 Posts: 1071
 
|
Posted: Thu Jan 01, 2004 5:08 am Post subject: |
|
|
no thats clcools i think
find where it has the checks for replys..
ie
| Code: | | if ($msg =~ /hi/i)<br />{<br /> $reply = "hi";<br />}<br />elsif ($msg =~ /whats up/i)<br />{<br /> $reply = "not much";<br />} |
and add
| Code: | | else<br />{<br /> $reply = "i dont know what to say";<br />} |
or if you dont have anything like that find where it sends the reply.. something like
$self->sendmsg($reply);
and change it to something like
| Code: | | <br />if ($reply ne "")<br />{<br /> $self->sendmsg($reply);<br />}<br />else<br />{<br /> $self->sendmsg("I dont know how to reply");<br />} |
|
|
| Back to top |
|
 |
ChEzMoNkEy Newbie

Joined: 04 Dec 2003 Posts: 28
   
|
Posted: Thu Jan 01, 2004 2:29 pm Post subject: |
|
|
| Quote: | sub reply { my $victim = shift; my $msg = shift; my $test = ""; my $temp = ""; my $reply = ""; print "Formating reply!!!\n"; if( !defined $Replies ) { &loadReplies(); }
foreach $test (@$Replies) { $temp = $test->{Regex}; if ( $msg =~ /$temp/i ) { $reply = $test->{Responce}; my $one = $1 unless !defined($1); #define the variable so that we can use them in my $two = $2 unless !defined($2); #the responce files my $three = $3 unless !defined($3); my $four = $4 unless !defined($4); my $five = $5 unless !defined($5); my $six = $6 unless !defined($6); my $seven = $7 unless !defined($7); my $eight = $8 unless !defined($ ; my $nine = $9 unless !defined($9);
#print $reply ."\n"; while ($reply =~ /\@(.+?) / || $reply =~ /\{\@(.+?)\}/) #process named lists in { } and out { $reply =~ s/(\@(.+?)) /JoinEM(0, $ListHash->{$2}) ." "/ige; $reply =~ s/(\{\@(.+?)\})/JoinEM(0, $ListHash->{$2})/ige; } #print $reply ."\n"; $reply =~ s/\((.*?\|.*?)\)/pick_one($1)/eg; #process unnamed lists my @tosay = split(/\|/,$reply); #break apart multiple responces seperated by $reply = $tosay [ int(rand(scalar(@tosay))) ]; #randomly pick one
$reply =~ s/\$1/$one/g unless !defined($one); #insert in the variables $reply =~ s/\$2/$two/g unless !defined($two); $reply =~ s/\$3/$three/g unless !defined($three); $reply =~ s/\$4/$four/g unless !defined($four); $reply =~ s/\$5/$five/g unless !defined($five); $reply =~ s/\$6/$six/g unless !defined($six); $reply =~ s/\$7/$seven/g unless !defined($seven); $reply =~ s/\$8/$eight/g unless !defined($eight); $reply =~ s/\$9/$nine/g unless !defined($nine);
$reply =~ s/\%sn/$victim/gs; $reply =~ s/(?/$1/eeig; $msg = ""; last; # we found a match. stop looking } if ($msg eq "") {last;} } return $reply; } |
that what you mean? :unsure: not a clue what to edit tbh |
|
| Back to top |
|
 |
ChEzMoNkEy Newbie

Joined: 04 Dec 2003 Posts: 28
   
|
Posted: Thu Jan 01, 2004 3:13 pm Post subject: |
|
|
ok, i fixed it, for some reason i'd removed
| Code: | | (.+?)*][What are you talking about?|What does that mean?|Hu?? |
but its back in there now  |
|
| Back to top |
|
 |
|