L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 11:01:20 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Coding and development discussion > Topic: How to get bot to ignore certain syntax in the relay module.
Pages: [1]   Go Down
« previous next »
Print
Author Topic: How to get bot to ignore certain syntax in the relay module.  (Read 322 times)
0 Members and 1 Guest are viewing this topic.
Diablo
Rookie
**
Offline Offline

Posts: 67


How to get bot to ignore certain syntax in the relay module.
« on: March 01, 2008, 01:31:55 AM »

I am needing some help on how to change the relay module so that certain syntax like @ when set wont be relayed to other bots but only shows in the main org bot that it was typed in. I tried putting preg_match in so it wouldnt send the gcr out in front of message would this be best way to do this.
Logged
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 877



WWW
Re: How to get bot to ignore certain syntax in the relay module.
« Reply #1 on: March 01, 2008, 02:18:07 PM »

a better way would be
Code:
If($msg[0] == "@")
{
   Return;
}
Prob at top of the function that handles none commands.

You should also use settings so you can easily change it instead of it being coded as@
Logged

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
Diablo
Rookie
**
Offline Offline

Posts: 67


Re: How to get bot to ignore certain syntax in the relay module.
« Reply #2 on: March 01, 2008, 10:16:43 PM »

i tried this code but not exactly sure where best place to put in the relay_guild module.
This should check another module for Syntax and if its there should not realy the chat.

Code:
if (preg_match("/^" . $this -> bot -> settings -> get ('HRelay1', 'nearSyntax') . " (.+)/i", $msg))
Logged
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Coding and development discussion > Topic: How to get bot to ignore certain syntax in the relay module.
« previous next »
 
Jump to:  

Recent
!items database
by Zeephonz
[Today at 08:05:21 PM]

Log playtime from buddys ...
by IKShadow
[Today at 06:48:12 AM]

[request] Raid timers
by Elesar1
[December 01, 2008, 04:41:09 PM]

Shared DB online list
by Temar
[December 01, 2008, 01:55:47 AM]

relay colors
by Temar
[December 01, 2008, 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]
Stats
Members
Total Members: 1244
Latest: Armonkens
Stats
Total Posts: 11146
Total Topics: 1505
Online Today: 25
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 1
Guests: 14
Total: 15
Vain

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.382 seconds with 29 queries. (Pretty URLs adds 0.026s, 4q)
Loading...