dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.2.5
snapcase has joined #cinch
<snapcase> is it possible to make a plugin perform some cleanup upon exiting a bot with SIGINT? I sam some code utilizing the :disconnect event and 'trap' to send #quit to the bot but I just get an error: `synchronize': can't be called from trap context (ThreadError)
<dominikh> calling #quit in a signal handler doesn't work anymore since Ruby 2.x – you'd have to set and poll some variable instead, outside the handler
<dominikh> poll outside the handler, that is
<snapcase> How would I go about doing that exactly?
<dominikh> by setting a variable in the signal handler and by looping and reading it somewhere else would be the straightforward solution
<dominikh> no idea what exactly ruby allows in signal handlers and if you can do something less stupid than that or not
djbkd has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
<leftylink> if don't want to poll... I did test and it's OK to use ConditionVariable#signal inside a handler, heh heh...
<dominikh> that'd be a better solution
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
rikai has quit [Read error: Connection reset by peer]
rikai has joined #cinch
rikai has quit [Remote host closed the connection]
rikai has joined #cinch
rikai has quit [Quit: No Ping reply in 180 seconds.]
rikai has joined #cinch
sarkyniin has joined #cinch
thews has quit []
ConcernedQuestin has quit [Ping timeout: 265 seconds]
eebs has joined #cinch
ConcernedQuestin has joined #cinch
ConcernedQuestin has quit [Ping timeout: 265 seconds]
ConcernedQuestin has joined #cinch
eebs1 has joined #cinch
eebs1 has quit [Quit: Leaving.]
_djbkd has joined #cinch
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #cinch
rikai has quit [Ping timeout: 255 seconds]
apt-get_ has joined #cinch
apt-get_ has quit [Max SendQ exceeded]
apt-get_ has joined #cinch
sarkyniin has quit [Ping timeout: 265 seconds]
rikai has joined #cinch
rikai has quit [Ping timeout: 245 seconds]
postmodern has joined #cinch
rikai has joined #cinch
eebs1 has joined #cinch
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #cinch
eebs1 has quit [Quit: Leaving.]
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #cinch
eebs has quit [Quit: Leaving.]
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #cinch
apt-get_ has quit [Quit: Quit]
_djbkd has quit [Quit: My people need me...]
_djbkd has joined #cinch