Omnimaga

Omnimaga => Discontinued => Our Projects => OmnomIRC Development => Topic started by: DJ Omnimaga on April 17, 2011, 10:33:41 pm

Title: The merged OmnomIRC lines glitch is back
Post by: DJ Omnimaga on April 17, 2011, 10:33:41 pm
Quote

[20:10:14] <DJ_O> [20:31:20] <+OmnomIRC> <turiqwalrus> happybobjr this is a new omnomirc feature. When your nickname is said, it bolds the text and makes it red
[20:31:47] <DJ_O> wtf
[20:31:56] <DJ_O> I didn't say that

Just now ???
Title: Re: The merged OmnomIRC lines glitch is back
Post by: yunhua98 on April 17, 2011, 10:34:31 pm
Also, if you have "<OmnomIRC>" in your message, your name has no link.

EDIT:  nvm, DJ was using an actual client that time.  x.x
Title: Re: The merged OmnomIRC lines glitch is back
Post by: Freyaday on April 17, 2011, 10:36:02 pm
So this has happened before?
Title: Re: The merged OmnomIRC lines glitch is back
Post by: DJ Omnimaga on April 17, 2011, 10:37:48 pm
Way back in June or July 2010, I think, or maybe it was April 2010, when OmnomIRC was created (back when post notices also did Cemetech/United-TI/Ti-Freakware/MaxCoderz). It was fixed back then.
Title: Re: The merged OmnomIRC lines glitch is back
Post by: Freyaday on April 17, 2011, 10:43:14 pm
Could the fix from then work now?
Title: Re: The merged OmnomIRC lines glitch is back
Post by: DJ Omnimaga on April 18, 2011, 01:23:30 am
I'm not sure. The log parser code is totally different now.
Title: Re: The merged OmnomIRC lines glitch is back
Post by: Freyaday on April 18, 2011, 01:29:33 am
Maybe the old fix is still in there and that's what's causing problems?
Title: Re: The merged OmnomIRC lines glitch is back
Post by: DJ Omnimaga on April 20, 2011, 11:13:27 pm
I don't think so. He totally rewrote the log parser from scratch. He most likely forgot to take quoted lines into account.
Title: Re: The merged OmnomIRC lines glitch is back
Post by: Xeda112358 on April 20, 2011, 11:26:22 pm
Wow, that is weird ??? I wonder if that has happened to others?
Title: Re: The merged OmnomIRC lines glitch is back
Post by: DJ Omnimaga on April 20, 2011, 11:27:47 pm
I think this only happened twice or three times so far.
Title: Re: The merged OmnomIRC lines glitch is back
Post by: Netham45 on April 22, 2011, 02:02:41 am
Anyone seen this lately?
Title: Re: The merged OmnomIRC lines glitch is back
Post by: DJ Omnimaga on April 24, 2011, 02:08:48 pm
I haven't, but I haven't used OmnomIRC in a few days. Not sure if anyone else got it. I personally didn't get it in a week at least.
Title: Re: The merged OmnomIRC lines glitch is back
Post by: DJ Omnimaga on May 01, 2011, 11:33:30 pm
Well it's back again now. If I quote someone, it shows up as if the person quoted me O.O
Title: Re: The merged OmnomIRC lines glitch is back
Post by: Netham45 on May 02, 2011, 02:48:46 am
hah, found what was causing it and fixed it. >:D

Edit: the problem was with a regex.

I had
Code: [Select]
^(.*)(\[[0-9]{2}:[0-9]{2}:[0-9]{2}\]) \<(.+?)\>(.*)
but the (.*) was making it match the last result on the line(and it was assuming that was the name and such), instead of the first. Changing that to (.?) worked to fix it.
Code: [Select]
/^(.?)(\[[0-9]{2}:[0-9]{2}:[0-9]{2}\]) \<(.+?)\>(.*)
Title: Re: The merged OmnomIRC lines glitch is back
Post by: DJ Omnimaga on May 02, 2011, 04:16:45 am
That looks more cryptic than z80 assembly! O.O
Title: Re: The merged OmnomIRC lines glitch is back
Post by: Netham45 on May 02, 2011, 04:20:49 am
The power of regex's. :P
Title: Re: The merged OmnomIRC lines glitch is back
Post by: ZippyDee on May 02, 2011, 04:22:06 am
That looks more cryptic than z80 assembly! O.O

It's really not. RegEx is actually fairly easy to learn, and it proves to be VERY useful in some situations. You really should at least take a look at it. :P

Edit: here's a link if you feel like checking it out http://www.regular-expressions.info/tutorial.html
Title: Re: The merged OmnomIRC lines glitch is back
Post by: Netham45 on May 02, 2011, 04:32:59 am
Yea, I simplified a 300+ line script into about 120 using regex's.
Title: Re: The merged OmnomIRC lines glitch is back
Post by: ZippyDee on May 02, 2011, 04:48:38 am
Exactly! And it's especially useful for things such as IRC where the content of each part changes (for instance the nick of the person speaking) but the restrictions stay the same (it only allows letters and numbers and undercore...and I guess in the case of OmnomIRC also &nbsp;?)

In that case, you can use regex like something as simple as "</w+>" to capture the name found within < and > in a message.
(In regex, anything followed by + tells it to look for 1 or more of that character/character-group. /w represents the character group [A-Za-z0-9_]).

Obviously that's a very general example, but still
Title: Re: The merged OmnomIRC lines glitch is back
Post by: DJ Omnimaga on May 02, 2011, 02:29:47 pm
Ah ok, it just seemed weird at first glance, like if it was just a bunch of random chars together. :P
Title: Re: The merged OmnomIRC lines glitch is back
Post by: Deep Toaster on May 07, 2011, 10:54:39 pm
You're right, I can see it used everywhere O.O