Author Topic: IRC Client Integration  (Read 38631 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: IRC Client Integration
« Reply #30 on: June 27, 2011, 05:29:00 pm »
Yeah, normally I have no issues in #omnimaga because of the (O) in color, but I used to have as much as in #cemetech. It was worse when I was doing other things and put mIRC at the bottom of the screen in a tiny window, though.

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: IRC Client Integration
« Reply #31 on: June 27, 2011, 05:31:14 pm »
I rely on colored nicks to tell who's talking a bit too much, and without that in x-chat, it was impossible to read. :P
Omnimaga Admin

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: IRC Client Integration
« Reply #32 on: June 27, 2011, 05:58:56 pm »
You have troubles with people talking too much? ???

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: IRC Client Integration
« Reply #33 on: June 27, 2011, 05:59:43 pm »
Yea, if they're using OmnomIRC, it's hard to read in X-Chat.
Omnimaga Admin

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: IRC Client Integration
« Reply #34 on: June 27, 2011, 06:00:40 pm »
Lol ok I thought you meant just talking a lot in general :P

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: IRC Client Integration
« Reply #35 on: June 28, 2011, 03:49:21 am »
Good news everyone!

I got it working now, thanks to this page :D

But it made xchat crash:
Code: [Select]
julien@amy:~$ xchat
terminate called after throwing an instance of 'std::regex_error'
  what():  regex_error
Abandon

And apparently it made my ZNC crash too O_o
« Last Edit: June 28, 2011, 03:51:15 am by Juju »

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: IRC Client Integration
« Reply #36 on: June 28, 2011, 04:09:28 am »
Hmm sorry to hear about the crash. Is there a way around that?

Also did it crash everyone's znc or just your connection?

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: IRC Client Integration
« Reply #37 on: June 28, 2011, 04:17:10 am »
I have to investigate... Well I know it's about the regex() thing.

Fortunately, it was my own ZNC nobody really uses but me and maybe 2 other people. Who all crashed BTW.
« Last Edit: June 28, 2011, 04:17:51 am by Juju »

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: IRC Client Integration
« Reply #38 on: June 28, 2011, 04:18:16 am »
Oh ok. I hope it's not a Linux issue x.x

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: IRC Client Integration
« Reply #39 on: June 28, 2011, 05:06:56 am »
Personally, I'd suggest finding another regex engine, instead of getting the current code to work with it.
Omnimaga Admin

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: IRC Client Integration
« Reply #40 on: June 29, 2011, 05:56:12 pm »
Looks awesome & useful! I love when things get simplified and integrated :D

I'm not using it myself though because I like to know who's actually online :-




Offline Tribal

  • The Fallen
  • LV5 Advanced (Next: 300)
  • *
  • Posts: 218
  • Rating: +15/-1
    • View Profile
Re: IRC Client Integration
« Reply #41 on: June 29, 2011, 06:41:56 pm »
Here is my version of the x-chat plugin.  I thought the original was overly complex for the work to be done, so I rewrote everything in C and I personally think it is more readable.  There was a small bug with nicks which I believe is fixed but I didn't test the fix so post here with any problems and hopefully someone(or I) will try and fix them.  I will try and help with problems, but I've been busy looking for work etc so I might not be able to get things working immediately.

Spoiler For Abandon All Hope, Ye Who Enter Here:
Code: [Select]
#include "xchat-plugin.h"
#include <string.h>

#define PNAME "OmnomIRC Integration"
#define PDESC "Integrates OmnomIRC into X-Chat"
#define PVERSION "0.1"

static xchat_plugin *ph;
static const char *omnomirc_nick = "OmnomIRC";

static int
message_cb(char *word[], void *userdata) {
    int i;
    char *res, *msg, nick[30];

    if (strcmp(word[1], omnomirc_nick))
        return XCHAT_EAT_NONE;

    msg = word[2];
    res = strchr(msg, '*');
    if (res != NULL && res-msg+1 < 11) {
        for (; msg != res; ++msg)
            *msg = '\x03';
        *msg = '\x03';
        *++msg = '6';
        word[1] = "*";
        return XCHAT_EAT_NONE;
    }

    for (i = 0; *msg != '>'; ++i,++msg) {
        if (*msg == '<')
            *msg = '\x03';
        nick[i] = *msg;
        *msg = '\x03';
    }

    *msg = '\x03';
    *++msg = '\x03';
    strcpy(word[1], nick);

    return XCHAT_EAT_NONE;
}

void
xchat_plugin_get_info(char **name, char **desc, char **version, void **reserved) {
    *name = PNAME;
    *desc = PDESC;
    *version = PVERSION;
}

int
xchat_plugin_init(xchat_plugin *plugin_handle,
                  char **plugin_name,
                  char **plugin_desc,
                  char **plugin_version,
                  char *arg) {
    ph = plugin_handle;

    *plugin_name = PNAME;
    *plugin_desc = PDESC;
    *plugin_version = PVERSION;

    xchat_hook_print(ph, "Channel Message", XCHAT_PRI_NORM, message_cb, NULL);

    xchat_print(ph, "OmnomIRC Integration loaded successfully!");

    return 1;
}
« Last Edit: August 18, 2011, 06:32:26 pm by Tribal »

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: IRC Client Integration
« Reply #42 on: June 30, 2011, 04:43:37 am »
Looks awesome & useful! I love when things get simplified and integrated :D

I'm not using it myself though because I like to know who's actually online :-

It doesn't alter the online users list.
Omnimaga Admin

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: IRC Client Integration
« Reply #43 on: July 25, 2011, 03:42:40 pm »
Was there a reason this thread was locked? Unlocked...
Omnimaga Admin

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: IRC Client Integration
« Reply #44 on: July 30, 2011, 12:22:15 pm »
No clue. Maybe somebody accidentally it. ???