Saturday 23 August 2008

The week in review...

So, lots has been happening, leaving me with not so much time to both get things done, and blog about my not getting things done... time to rectify that this weekend, we hope.

I had two chumps come in to put two new doors in as part of the kitchen renovation, and they did an absolutely "stellar" job, including leaving a hole in the wall, using white painted wood when we wanted unpainted wood, and generally making a fucking mess.

I've just about managed to clean up the hole in the wall with judicious use of "husfix rapid" which they were kind enough to give us, but I'm really not happy with the 7000KR (~Ãrn mynamespace.two()
except:
return "there was an error processing your request (:"

... of course, that's not gonna work.

Queue some hours (days, actually) - of reading, searching, trying exotic tricks like the (apparantly old) knee module, trying __import__() magic, and other various hacks - before finally stumbling across this gem:

http://stackoverflow.com/questions/211100/pythons-import-doesnt-work-as-expected

Namely:
def my_import(name):
mod = __import__(name)
components = name.split('.')
for comp in components[1:]:
mod = getattr(mod, comp)
return mod

So, now I have:
try:
mname = "lc." + str(one)
mod = my_import(mname)

if two == False:
two = "index"

f = getattr(mod, two)
return f()

except:
return "Sorry, I wasn't able to process your request."

Great stuff!

Labels: ,

Monday 11 August 2008

StarChat...

So, it seems (that thanks to GraBBeR's expert manipulation!) that I am now a NetCoder on StarChat.

That's excellent, I like the place and the people all seem quite good too.

The code, however, is suffering from a bit of neglect. It has been hacked on over many years by lots of different people of varying skills (take a look at dreamforge, you'll get what I mean)..

I have interesting plans, but it's going to be a long time before the rewards start getting reaped.

One of these plans has already been started (and kind of finished) - services now compile under g++ (C++) as opposed to gcc (C), meaning I can use STL to speed up development and lower overall code-size and maintenence cost.

Great fun, for IRC coder masochists, I guess...

Sunday 10 August 2008

Quickie before bed

Despite the (potentially suspicious) title, this blog posting is about nothing saucy, just me writing up a quick entry before bed.

Honest!

Conspire's in-place search now works just a tiny bit better (the "forwards" button actually *does* something), and it also provides visual feedback when there are no matching text entries, which should also be helpful... I find it much easier to use at least.

GMS also had it's second (first real) commit from me today, the skeletal web end of things is now in there, which is good.

On freenode, it seems like an (eventual) project after GMS may be re-templating and doing various work on the website. Rar...

More cupboard doors on the kitchen, which makes me a happy chappie. Just three to go now, and we're done with the annoying part - although we also have two new ones to put on which is probably going to suck.

I swear, I'm never redecorating for a year after this. Oh, well, except after I finish the staircase.... :(

Labels:

Saturday 9 August 2008

Performs 'n stats!

A mostly boring day, albeit, thankfully a friday!

I unbroke the 1.1 stable build of insp (few careless typos, thanks CBX for your help!), worked a bundle, ate some delicious porridge and went shopping where I met a man with a head on a 90 degree angle with his back!

Fascinating.

In other OSS news, I committed multi-line performs to Conspire (a lack of a feature that has been severely pissing me off for a long time. I'm really not sure what the people who helped come up with the XChat UI were thinking, but it's a serious hinderance for most serious (ab)users of IRC -- one which is now (thankfully!) rectified.

InspIRCd also has a really nifty graph on the stats page (created by moi). Apparantly jpgraph sucks at drawing dates for a short time period - it's gradually been getting better over time. Anyway, if you want a look, take a look at http://www.inspircd.org/?p=stats :).

Also had a nice time speaking to GraBBer about various stuff this evening (hi!).

Labels: , ,

Thursday 7 August 2008

On fridges and computers

So, a third post in a day - this one about the Real World(tm).

Today.

I was incredibly tired after last nights Marathon Bug Hunt Session with Namegduf, which happily resulted in fixing the Bug To End All Bugs (aka, I link anope and my network falls apart occasionally), however I yawned a lot, logged into my laptop, yawned a lot more, and proceeded to bug christel on IRC(! see, I told you you'd get a mention) about defocus and other goodly freenode bits, etc ..err, osv. :)

(I'm really enjoying my time on freenode, although I wish I had a bit more to devote to it at the moment...)

, so I soldiered on steadily, squashing a few work related issues before finding out that we had a launch happening today, which I thought was tomorrow.

Fantastic.

Thankfully that went off largely without a hitch, despite taking most of my afternoon away.

Then, it suddenly poured down rain on the kitchen cupboard doors we'd left outside after painting.

Fuck. Talk about one thing after another.

Fast forward, it's evening time, and Kamilla and her mother arrive back home, from "picking the kitchen doors up", with -- a laptop and a fridge.

Lesson learned: never let two women go to town shopping together!

Anyway, I got to set it up, it's a nice Toshiba, and was quite inexpensive too. Given my shit experiences with HP, I think I'll be buying Toshiba next time.

The fridge was heavy.

Taking the old leaking one outside was even more heavy.

I can't wait to be back home sometimes. :)

Labels: ,

Yummy extended bans goodness.

So, I said I'd make a seperate post about extended bans, and here it is.

The general comment is that I have them coming out of my ears. I love the concept of extended bans, at least the general idea of being able to restrict someone from performing specific actions.

That having been said, I don't think I've ever seen it end up quite this flexible.

I've not talked about how our extended bans work in detail, so I will now, both on a user and a developmental level.

We have multiple (15, so far -- full list later!) types of extended bans. These affect different ways a user may interact with a channel.

Each banmask only affects the user in *one* way (e.g. +b some!user@here only stops matching users from joining, whereas +b m:some!user@here will *only* stop that user from talking, and +b V:some!user@here will *only* affect their ability to invite, etc).

All of these bans can be exempted using +e if m_banexempt is loaded, and the extended exempts again *only* apply to the type that they match (e.g. +e some!user@here only affects joins, whereas +e m:some!user@here means that the matched user may always talk).

This provides pretty good flexibility.

About some of the bantypes themselves... Virtually every channel mode which applies a restriction to users has an equivilant extban (I don't say all, because not all of them we think makes sense - if you think we missed one, talk to me!).

We also have a few extra, like +b j: and +b s: - stop a user joining a channel if in a banned channel (e.g. +b j:#badchan) and stop a user joining if connected to a matching server mask (e.g. +b s:some.server.here).

The second one is interesting, as it can essentially be used to simulate local channels (+be s:* s:my.server.only).

Second last thing, a list of currently implemented extbans:
N m_nonicks prevents nickchanges from +b'd masks, allows +e
r m_gecosban prevents matching +b from joining, allows +e
m m_muteban prevents matching +b from speaking, allows +e
M m_services_account prevents matching accounts from speaking, allows +e
R m_services_account prevents +b accounts from joining, allows +e
B m_blockcaps prevents matching +b from using caps, allows +e
c m_blockcolours prevents matching +b from using colours, allows +e
V m_noinvite prevents matching +b from using /invite, allows +e
T m_nonotice prevents matching +b from using /notice to channel, allows +e
Q m_nokicks prevents matching +b from using /kick, allows +e
S m_stripcolor strips colours from matching +b, allows +e
O m_operchans prevents matching +b opertype mask from joining, allows +e
C m_noctcp prevents matching +b from CTCP, allows +e
j m_channelban prevents user from joining a channel if a channel they are already on matches a +b j: mask, allows +e
s m_serverban prevents user from joining if connected to a server matching a mask, allows +e


Now, as to how they may be used in code, easy.

Modules implementing an extban MUST hook On005Numeric and use ServerInstance->AddExtBanChar(). It's not mandatory, but I will come and hit you with something heavy if you don't.

After doing that, hook whatever event you want, and use chan->IsExtBanned(user or string, 'typechar'), e.g in pseeudocode:

onuserprejoin(channel, user)
foreach c in user's channels
if (c->IsExtBanned(channel->name, 'j'))
return 1;

That code is essentially how the 'j' extban works. Exempts to extbans are handled internally inside IsExtBanned, so it's really a piece of total piss to write one. :)

Be creative, and show me what you can do! :D

(And yes, speedfreaks, I do have plans on how to make this faster in the future)

Labels:

Wednesday 6 August 2008

Catchup

So, I say I'm going to use this more, and then I run off from the internet for a while and nothing gets put here. Fantastic!

In the spirit of trying to actually use this again, here's what the past few months of my life have comprised of:

1) Going and visiting my family in Australia, my place of birth. I stayed there all of June.
2) Going to England in early July.
3) Staying overnight
4) Waking up, going to the airport, catching a plane to Norway
5) Staying in Norway, while catching up on most of what I missed while I was in Australia...

5) is the important point. What did I miss out on, you ask?

1) InspIRCd. It was largely neglected during this time, in fact, the build was broken for a week or so.
2) ChatSpike (I was hardly online)
3) Atheme (There were bugs in the CS conversion, oops)
4) My real life
5) ... You get the picture

So, what have I been doing since I got back?

Well, Insp extbans are now sexy. I'll devote a seperate post to them. I'm now on the Conspire dev team, which is proving to be quite fun, I've added a few things I like in IRC clients already.. I'm also working on GMS (group management system) for freenode, and trying to get rid of my backlog of stuff to do at work... all good fun.

Oh, and I'm renovating a kitchen, in case that wasn't enough for you.

If this isn't purgatory, I don't know what is. :-)

Labels: , , ,