Omnimaga
Omnimaga => Discontinued => Our Projects => OmnomIRC Development => Topic started by: DJ Omnimaga on April 17, 2011, 10:33:41 pm
-
[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 ???
-
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
-
So this has happened before?
-
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.
-
Could the fix from then work now?
-
I'm not sure. The log parser code is totally different now.
-
Maybe the old fix is still in there and that's what's causing problems?
-
I don't think so. He totally rewrote the log parser from scratch. He most likely forgot to take quoted lines into account.
-
Wow, that is weird ??? I wonder if that has happened to others?
-
I think this only happened twice or three times so far.
-
Anyone seen this lately?
-
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.
-
Well it's back again now. If I quote someone, it shows up as if the person quoted me O.O
-
hah, found what was causing it and fixed it. >:D
Edit: the problem was with a regex.
I had
^(.*)(\[[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.
/^(.?)(\[[0-9]{2}:[0-9]{2}:[0-9]{2}\]) \<(.+?)\>(.*)
-
That looks more cryptic than z80 assembly! O.O
-
The power of regex's. :P
-
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
-
Yea, I simplified a 300+ line script into about 120 using regex's.
-
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 ?)
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
-
Ah ok, it just seemed weird at first glance, like if it was just a bunch of random chars together. :P
-
You're right, I can see it used everywhere O.O