collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: simplified IRC module?  (Read 5725 times)

0 Members and 1 Guest are viewing this topic.

Offline uberjon

  • BeBot User
  • **
  • Posts: 32
  • Karma: +0/-0
simplified IRC module?
« on: July 26, 2009, 01:06:55 am »
I had a brain storm of a great idea for bebot. one that i hope should be fairly simple..

forum shoutbox to guild chat and reverse of course.

quite simply anything typed into the shoutbox would be replicated on guild chat by the bot. anything typed in guild chat would be replicated into the guild shoutbox (via direct insert of the database)

the database structure is quite simple.

Code: [Select]
s_id // auto increment
s_id // member id would be 0 in this case for guest.
s_date // would be date()
s_message // would be the message
s_ip // would be 127.0.0.1
s_edit // would be null

unfortunately i have limited knowledge of php "classes" so it may take me a while (possibly a long while) to do this myself. so i am requesting help on this. i assume it would be quite easy?

~uberjon (one and same from SMF forums)

Offline clashbot

  • BeBot Expert
  • ****
  • Posts: 295
  • Karma: +0/-0
    • Ascension's Home
Re: simplified IRC module?
« Reply #1 on: July 26, 2009, 01:08:42 am »
uber, it would be nice if you could expand this to include the ajaxchat integration in some smf forums. I personally don't use the shoutbox, but do have the ajaxchat

Offline uberjon

  • BeBot User
  • **
  • Posts: 32
  • Karma: +0/-0
Re: simplified IRC module?
« Reply #2 on: July 26, 2009, 01:32:52 am »
uber, it would be nice if you could expand this to include the ajaxchat integration in some smf forums. I personally don't use the shoutbox, but do have the ajaxchat


*blush* hehe. well i could possibly look into that. however i am quite unfamliar with the bebot code end of things.. thats why im posting here.

i believe it would be entirely possible for my needs to have this done without any edits to the forum im using (thats not smf actually..)

but if its possible to do it as easy via the database for your needs, whatever anyone here comes up with should work for you too.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: simplified IRC module?
« Reply #3 on: July 26, 2009, 02:14:05 am »
I'm a bit swamped atm, so I unfortunately don't have any time to spare for this.

You should not worry too much about PHP classes for what you want to do. A good starting point would be the example module: http://bazaar.launchpad.net/~bebot-devel/bebot/stable-0.6/annotate/head%3A/modules/example/_ExampleModule.php


BeBot Founder and Fixer Kingpin

Offline uberjon

  • BeBot User
  • **
  • Posts: 32
  • Karma: +0/-0
Re: simplified IRC module?
« Reply #4 on: July 26, 2009, 04:03:33 am »
I'm a bit swamped atm, so I unfortunately don't have any time to spare for this.

You should not worry too much about PHP classes for what you want to do. A good starting point would be the example module: http://bazaar.launchpad.net/~bebot-devel/bebot/stable-0.6/annotate/head%3A/modules/example/_ExampleModule.php




that has helped a great deal! i am stuck on one part though i think.

having the bot speak in guild chat. no idea where to find such a function/class. could you point me in the direction to have a custom module do that?

im hoping its something simple thats already included when the module gets loaded by the bot. such as say() or such?

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: simplified IRC module?
« Reply #5 on: July 26, 2009, 10:40:35 am »
$this->bot->send_gc("I want to say something too!") is your friend ;)
And it works in all modules (well at least all modules extending the BaseModules).

If you want to colorize stuff check out the color module for color tags, they are enclosed in ##tagname##.

Offline uberjon

  • BeBot User
  • **
  • Posts: 32
  • Karma: +0/-0
Re: simplified IRC module?
« Reply #6 on: July 26, 2009, 06:46:13 pm »
$this->bot->send_gc("I want to say something too!") is your friend ;)
And it works in all modules (well at least all modules extending the BaseModules).

If you want to colorize stuff check out the color module for color tags, they are enclosed in ##tagname##.

thanks, the send_gc seems to be what i needed. however now it seems once setup that my method of "catching guild chat talk" to send to the shoutbox db is indeed not correct.

could you or someone help on this as well? i currently have a 1-way chat possible :p (website > conan chat) instead of (website <> conan chat)

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: simplified IRC module?
« Reply #7 on: July 26, 2009, 07:23:11 pm »
First register the apropriate event (assumes you are extending BaseActiveModule)
Code: [Select]
$this->register_event("gmsg", "org");

Then add the function to handle the message
Code: [Select]
function gmsg($name, $group, $msg)
{
}
BeBot Founder and Fixer Kingpin

Offline uberjon

  • BeBot User
  • **
  • Posts: 32
  • Karma: +0/-0
Re: simplified IRC module?
« Reply #8 on: July 27, 2009, 04:06:39 am »
uber, it would be nice if you could expand this to include the ajaxchat integration in some smf forums. I personally don't use the shoutbox, but do have the ajaxchat


can you tell me specifically the SMF version and the mod link/version so i may look into porting this? (assuming you ain't going to judge my code as long as it doesnt break something.. not the best :p)

Offline clashbot

  • BeBot Expert
  • ****
  • Posts: 295
  • Karma: +0/-0
    • Ascension's Home
Re: simplified IRC module?
« Reply #9 on: July 27, 2009, 01:18:21 pm »
I'm running smf 1.1.9 with TP.

Link to the ajax mod is http://custom.simplemachines.org/mods/index.php?mod=1319

If you would like to see how it operates currently, you can visit my org forums, register, and will let you take a look. Send me a pm if this is something you would like to do.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: simplified IRC module?
« Reply #10 on: July 27, 2009, 03:20:25 pm »
I'm running smf 1.1.9 with TP.

You really should update your SMF install ;)
BeBot Founder and Fixer Kingpin

Offline clashbot

  • BeBot Expert
  • ****
  • Posts: 295
  • Karma: +0/-0
    • Ascension's Home
Re: simplified IRC module?
« Reply #11 on: July 27, 2009, 03:35:18 pm »
oops, tells how often I head into the admin section.. heh, 1.1.10 now

Offline clashbot

  • BeBot Expert
  • ****
  • Posts: 295
  • Karma: +0/-0
    • Ascension's Home
Re: simplified IRC module?
« Reply #12 on: July 27, 2009, 03:53:39 pm »
funny thing is khalem, I had upgraded my forums for eve, forgot to upgrade my one for anarchy.


Offline uberjon

  • BeBot User
  • **
  • Posts: 32
  • Karma: +0/-0
Re: simplified IRC module?
« Reply #13 on: August 03, 2009, 06:10:04 pm »
oops, tells how often I head into the admin section.. heh, 1.1.10 now


hehe. sorry for the continuous delay.. but im having some issues getting the ajaxchat to install... even when i update the .zip myself to fix the version error i still get the error... weird.. :( il have to continue trying though!

Offline clashbot

  • BeBot Expert
  • ****
  • Posts: 295
  • Karma: +0/-0
    • Ascension's Home
Re: simplified IRC module?
« Reply #14 on: August 03, 2009, 06:14:15 pm »
ajaxchat is notorious for not installing correctly, especially with prettyurls installed. You might want to search through the forum support on ajaxchat for clashbot there as well as I had issues getting it installed easily as well.

Unless I am spewing random nonsense because you are not talking about ajaxchat for smf, in which case ignore my previous ramble ;D ;D ;D

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 664
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal