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?
November 20, 2008, 05:07:53 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: Improving relay over IRC
Pages: [1] 2   Go Down
« previous next »
Print
Author Topic: Improving relay over IRC  (Read 1504 times)
0 Members and 1 Guest are viewing this topic.
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Improving relay over IRC
« on: March 07, 2007, 01:27:33 AM »

I promissed khalem I'd post this, so here it goes.

Currently things like items etc aren't relayed properly.
Also when using IRC to relay between guilds the output is a bit dodgy like:
[Your Guild] Bot: [IRC] Otherbot: [Their Guild] Someguy: hi

To solve this without affecting the readability on IRC, I build a very small protocol using "hidden characters".
I have currently implemented this in VhaBot and it would be nice if more bots adopt it.

Some basic information:
[BOLD]: Character 2
[REVERSE]: Character 22
[UNDERLINE]: Character 31
[COLOR]: Character 3

These are all characters used by most IRC clients to format text.
They function as a toggle. each appearance of the character reverses the effect. (placing a bold makes the text bold, placing another makes the text normal again).
We can abuse this by placing them in sets of 2, which means they are visually invisible to the users (on any modern irc client).

Message relaying:
Before: [Channel] Nickname: message
After: [BOLD][BOLD][BOLD][Channel][BOLD] Nickname: message
It starts with 2 bold characters, followed by the [Channel] outputted as bold.
When receiving a message following this structure, you don't display [IRC] Botname: [Channel] Nickname: message
but directly display: [Channel] Nickname: message
Also, this is the way it's currently implemented in IGN. while it may be a dying piece of crap, some compat never hurts.
All bold characters are required.

Items relaying:
Before: check this item Burden of Incompetence (http://url to auno/aodb)
After: check this item [COLOR][COLOR]Burden of Incompetence[COLOR] [COLOR](http://auno.org/ao/db.php?id=123&id2=123&ql=200)[COLOR][COLOR]
The space between the second set of [COLOR] is intentional.
There's also an id2= added to the url. this is done because while auno only need 1 id to operate, we need both to generate a valid item ingame.
Some patterns I'm using for this:
this.ItemFormat = this.COLOR + this.COLOR + "{0}" + this.COLOR + " " + this.COLOR + "(http://auno.org/ao/db.php?id={1}&id2={2}&ql={3})" + this.COLOR + this.COLOR;
this.ItemPattern = this.COLOR + this.COLOR + "(.+?)" + this.COLOR + " " + this.COLOR + "[(](.+?)id=([0-9]+)&id2=([0-9]+)&ql=([0-9]+)[)]" + this.COLOR + this.COLOR;
First line is the way we format it, second line is the regexp for finding the messages.
On the first line replace {0} with the item name, {1} with the lowID, {2} with the highID, {3} with QL
(LowID doesn't mean the ID is lower than HighID. it means the associated QL with that ID is lower than the QL of the HighID. in case of doubt, just use how AO sends it to you)
« Last Edit: May 04, 2007, 03:18:47 PM by Vhab » Logged
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: Improving relay over IRC
« Reply #1 on: March 09, 2007, 05:56:04 PM »

Thanx Vhab.

Been giving this some thought as of late. Just need time :\
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: Improving relay over IRC
« Reply #2 on: March 16, 2007, 01:25:34 PM »

Seeing there's some development regarding IRC going on by non-contributors (no offense intended, refering to people without access to the contributors forum) can this post be moved to a public sub-forum?
Logged
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Improving relay over IRC
« Reply #3 on: March 16, 2007, 02:50:36 PM »

Moved to 0.2 support, lemme know if you want it anywhere different.

-jj-
Logged
Nytridr
Expert
*****
Offline Offline

Gender: Male
Posts: 256


WWW
Re: Improving relay over IRC
« Reply #4 on: March 16, 2007, 08:51:23 PM »

I have posted this before somewhere else.. but atm really just to sick to look for it.. but here is some of the mods I made for the alliance I am in.. and it seems to work halfway decent..

I have added a lang filter which you can turn it on and off while in game..

put a limit that the IRC will send out that way if something is to long it will just not send it..

took out the formating changing in the sending and reciving for now.. till either I can figure out how to do it correctly or someone else can.. with the items across the IRC.. since on the reciving side it needs to be reconverted back into a workable link.

http://metanyt.homeip.net:8888/bebot/


since to me it seems things should problably be under the same topic I figured I would repost it here.. that way who ever wants to look my simple changing of things can..Smiley
Logged

Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1076


Re: Improving relay over IRC
« Reply #5 on: May 04, 2007, 12:26:29 PM »

What char is [COLOR]? Or is that something else? Got no real clue about IRC tbh Smiley
Logged
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: Improving relay over IRC
« Reply #6 on: May 04, 2007, 03:18:28 PM »

my bad, seems i forgot that one.
it's ascii 3
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1076


Re: Improving relay over IRC
« Reply #7 on: May 05, 2007, 05:25:54 AM »

Implemented and working, just got to wait for the SVN to be back up to commit it.
Logged
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: Improving relay over IRC
« Reply #8 on: May 05, 2007, 05:29:24 AM »

nice Cheesy
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1076


Re: Improving relay over IRC
« Reply #9 on: May 05, 2007, 06:25:48 AM »

One question:

Code:
$msg = preg_replace("/<a href=\"(.+)\">/isU", "[link]", $msg);
$msg = preg_replace("/<\/a>/iU", "[/link]", $msg);
$msg = preg_replace("/<font(.+)>/iU", "", $msg);
$msg = preg_replace("/<\/font>/iU", "", $msg);
The code above is in the gmsg() and privgroup() functions, removing ingame blobs and colors.

Is there any way to format it in a decent way for IRC while saving all information so the tags can be recreated on the other bots of the relay?
Logged
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: Improving relay over IRC
« Reply #10 on: May 05, 2007, 07:44:50 AM »

don't think so, firstly because of the size of the blobs, it'll easy hit the irc max and flood limit.
also, you'll have to visualize all data on the irc side in some way, and spamming the full contents of a blob to irc is a tad too spammy imo.
Logged
Blueeagle
Omnipotent
BeBot Developer
Expert
********
Offline Offline

Gender: Male
Posts: 313



Re: Improving relay over IRC
« Reply #11 on: May 05, 2007, 07:49:42 AM »

The only way I see such a thing fesable is if someone runs a command and then have the bot reply in /msg-s.

Well you could always write the blob to a file and post it to a web-server or such. Smiley
Logged

The only problem that can't be solved by adding another wrapper is having too many wrappers.
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1076


Re: Improving relay over IRC
« Reply #12 on: May 05, 2007, 07:52:55 AM »

I'll just leave it then.
Logged
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: Improving relay over IRC
« Reply #13 on: May 05, 2007, 06:04:24 PM »

SVN is up. I know it's been a bit unstable in the past few days.

We are experiencing some hardware issues with this system as it has frozen up completely 5 or 6 times now in the past few days.

A hardware swap is planned asap which hopefully will bring SVN back to being stable.
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1076


Re: Improving relay over IRC
« Reply #14 on: May 05, 2007, 06:07:25 PM »

Commited.
Logged
Pages: [1] 2   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Coding and development discussion > Topic: Improving relay over IRC
« previous next »
 
Jump to:  

Recent
Log playtime from buddys ...
by Temar
[Today at 10:33:57 AM]

Vote Core module and Simp...
by Temar
[November 19, 2008, 09:26:52 AM]

Restrict access for one m...
by Organizer
[November 19, 2008, 03:21:19 AM]

Custom / Revised Modules ...
by Elesar1
[November 17, 2008, 03:51:46 PM]

TWC
by Temar
[November 16, 2008, 11:39:12 AM]

Are there any FUN modules...
by Elesar1
[November 15, 2008, 07:39:15 PM]

Call to a member function...
by exxie
[November 15, 2008, 09:29:31 AM]

Ported Modules
by Alreadythere
[November 14, 2008, 06:10:07 PM]

cURL and other non-defaul...
by Temar
[November 14, 2008, 04:11:44 PM]

Delete member from Bot al...
by Alreadythere
[November 14, 2008, 12:17:54 PM]
Stats
Members
Total Members: 1235
Latest: DDDepressionnn
Stats
Total Posts: 11034
Total Topics: 1495
Online Today: 15
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 3
Guests: 22
Total: 25
End
Elesar1

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.44 seconds with 27 queries. (Pretty URLs adds 0.043s, 4q)
Loading...