dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.2.5
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
_djbkd has joined #cinch
ChasedSpade has quit [Remote host closed the connection]
ChasedSpade has joined #cinch
ChasedSpade has quit [Quit: No reason specified.]
ChasedSpade has joined #cinch
_whitelogger has joined #cinch
djbkd has quit [Ping timeout: 264 seconds]
postmodern has quit [Quit: Leaving]
CaveJohnson is now known as Zackio
sarkyniin has joined #cinch
irsol has quit [Remote host closed the connection]
nekosune has joined #cinch
<nekosune>
Hello all, sorry for the stupid question, is there anyway to make sure that a plugin only runs AFTER other plugins?
irsol has joined #cinch
britneywright has joined #cinch
sarkyniin has quit [Remote host closed the connection]
<apeiros>
nekosune: don't worry, it's not a stupid question.
<nekosune>
as I have a plugin that runs on any incoming message, just to keep track of whensomeone last spoke for a !lastseen command, but it turns out that causes acollision with other plugin s trying to use the databse
<apeiros>
use Bot#synchronize
<apeiros>
it won't ensure order, but it will ensure that there's no collision
<nekosune>
thankyou! :)
<nekosune>
the order dosnt matter, as long as they are not trying to hit the db at the same time
<nekosune>
I have moved to mysql to continue dev, but as you can imagine, I dont want to need a mysql server for an IRC bot
<apeiros>
I use a pg server for my irc bot :)
<nekosune>
nice :)
Azure has quit [Quit: My MBP went to sleep.]
<apeiros>
is there a list of all values Message#command can return?
<dominikh>
the IRC spec :)
<apeiros>
dominikh: the irc spec doesn't say anything about integers, symbols, strings :-p
<apeiros>
ok, the docs actually say "String"
<dominikh>
:)
<apeiros>
so uppercase command name? like "KICK"?
<dominikh>
yes.
<apeiros>
ok
<apeiros>
thx :)
<dominikh>
why do you need to look at Message#command?
<apeiros>
logging channels
<dominikh>
ok
<apeiros>
dominikh: I hope cinch does not sanitize Message#raw, right?
<dominikh>
it's called raw.
djbkd has joined #cinch
<apeiros>
dominikh: yeah, but I also expected raw to be binary, yet it is utf-8 ;-)
<apeiros>
and I prefer not to make assumptions where I don't have to
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Ping timeout: 256 seconds]
djbkd has joined #cinch
djbkd has quit [Ping timeout: 252 seconds]
djbkd has joined #cinch
sarkyniin has joined #cinch
nekosune has quit [Quit: Leaving.]
apeiros is now known as apeiros|not
apeiros|not is now known as apeiros
<apeiros>
hm, when I do User("bots_nick"), I get an incomplete user object, no authname, no host. is that a known bug? I don't see it on the issue list.
<dominikh>
what do you mean by "incomplete"? all of these attributes will be filled in when you use them for the first time
<apeiros>
ok, so it actually happens without op-ing too
<dominikh>
yeah okay, I see the issue
<dominikh>
sort of, anyway
<apeiros>
should I try to pin down when it happens? or do you have an idea where to look?
<dominikh>
I know what's wrong, pretty much
<dominikh>
sigh, I really ought to rewrite those bits…
<apeiros>
I know that feeling
<dominikh>
fwiw, you probably do not want catchall, that catches everything, including e.g. the WHOIS replies
<apeiros>
I do ponder logging all messages I get
<dominikh>
anyway, the bug is with how we treat users and the bot separately. back then I decided that whenever you dealt with the bot, you should get the Bot instance, not a User instance with that nick
<apeiros>
after all, space is nowadays not really an issue
<dominikh>
alas, in some places, I "forgot" that, so some operate on the Bot, and some on a User with the same nick
<dominikh>
which means the attribute gets synced for the wrong object, or alternatively you operate on the wrong object
<dominikh>
I should've never made that decision in the first place, but now we're stuck with that
<apeiros>
mhm
<dominikh>
so I guess I got to fix the bug
<apeiros>
iirc I used a multiton pattern in butler
<apeiros>
where you would never get a new user object as long as that user was "in sight" of the bot
<dominikh>
yes, we use that, too.
<apeiros>
and the bot simply never went out of its own sight :)
<dominikh>
well, except for the "in sight" bits, which is why explicit User#refresh is needed
<apeiros>
(that did mean a potential bug when your own ip address would change, but not sure how irc would react to that anyway…)
<dominikh>
however, the issue is that Bot and User are two different types, and ideally there should never be a User for the bot itself
<dominikh>
that's the bug
<dominikh>
well, ideally ideally there should be, but that's something for Cinch 3 :)
<dominikh>
maybe Cinch 3 will also have less race conditions…
* apeiros
wants more time
<apeiros>
would love to revive butler
<dominikh>
I'm sick of IRC ;)
<apeiros>
ok. lets use the time instead to implement a new distributed text protocol based chat! :)
<apeiros>
can't be that hard. go & ruby version.
<dominikh>
have fun ;)
<apeiros>
=(
<dominikh>
man, try to fix a bug, find more bugs…
<dominikh>
if I still liked ruby or IRC, I'd rewrite Cinch from scratch…
<apeiros>
oh, that you no longer like ruby is unexpected
<dominikh>
all the string operations are aware of encodings and characters, which is why I suggested converting to arrays of characters for mutable functions.
<dominikh>
if strings were just arrays of bytes, then yes, I would've suggested bytes
<apeiros>
you can still operate on it on a byte level
<apeiros>
which is sometimes necessary
<dominikh>
that is besides the point
<apeiros>
also you can't convert a string with invalid content
<dominikh>
stop arguing over a stupid detail, I don't care if you make it an array of bytes, runes, or unicorns :) it's the exact same concept wrt mutable vs immutable
<apeiros>
fine. I want an array of unicorns.
<apeiros>
and yes, I agree with your main point, that mutable strings are far less often needed than immutable strings
<dominikh>
heck, even most of the bang methods on string don't mutate, they allocate a new one and replace the old one
<dominikh>
unless that changed.
<apeiros>
and I also agree that if you'd design a language, you could easily use the nice syntax for immutable strings and the less nice syntax, or even only methods, for mutable ones
djbkd has quit [Remote host closed the connection]
<apeiros>
dominikh: thanks a lot for all your help!
<dominikh>
no problem
nekosune has quit [Read error: Connection reset by peer]
Azure has joined #cinch
djbkd has joined #cinch
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sarkyniin has quit [Remote host closed the connection]