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?
October 06, 2008, 08:46:58 AM

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 284 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: 772



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
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 cthulhu
[October 05, 2008, 11:36:16 AM]

Supplies needed module
by viper
[October 05, 2008, 11:11:13 AM]

Assist
by Foxy
[October 05, 2008, 05:09:02 AM]

How's 0.5.x coming? Wonde...
by Hyde
[October 04, 2008, 04:59:20 PM]

TWC
by Elesar1
[October 04, 2008, 12:55:59 PM]

Org in AoC
by Alreadythere
[October 04, 2008, 04:50:00 AM]

OnlineOrg
by Slacklin
[October 04, 2008, 03:06:00 AM]

Learning .NET, Mono, C#, ...
by Vhab
[October 04, 2008, 02:39:03 AM]

guild taxes module for ag...
by Elesar1
[October 03, 2008, 09:06:09 AM]

MediaControl
by Elesar1
[October 03, 2008, 08:38:18 AM]
Stats
Members
Total Members: 983
Latest: Titerris
Stats
Total Posts: 10740
Total Topics: 1448
Online Today: 15
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 2
Guests: 33
Total: 35
cthulhu
Karsta

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