dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.0.5
v0n has joined #cinch
<newton>
dominikh: frankly, I have no idea :(, it looks like I'd do bot.oper(...), or maybe I'm just doing something wrong
<dominikh>
newton: have you looked at the examples? and realized how it's basically reacting to events?
<newton>
something like, on :connect { |m| m.oper ... }?
<dominikh>
m.bot.oper, but yeah
<newton>
ahh, okay, thanks
v0n has quit [Ping timeout: 246 seconds]
space_ has joined #cinch
Space has quit [Ping timeout: 248 seconds]
<newton>
m.bot.oper is resulting in `undefined method `oper' for #<Bot...`
<dominikh>
hm, looks like Bot#oper isn't in the latest release, only on the master branch in git. either run from master, or use m.bot.irc.send("OPER the arguments")
<newton>
thanks agian
sleetdrop has joined #cinch
sleetdrop has quit [Client Quit]
<Donovan>
waxjar, you around?
sleetdrop has joined #cinch
v0n has joined #cinch
sleetdrop has quit [Ping timeout: 240 seconds]
sleetdrop has joined #cinch
v0n has quit [Ping timeout: 240 seconds]
v0n has joined #cinch
jonahR has joined #cinch
v0n has quit [Ping timeout: 240 seconds]
sleetdrop has quit [Quit: Computer has gone to sleep.]
sleetdrop has joined #cinch
jonahR has quit [Quit: jonahR]
ColdBlooder has joined #cinch
postmodern has quit [Ping timeout: 240 seconds]
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #cinch
Spami has joined #cinch
postmodern has joined #cinch
<waxjar>
hi Donovan, i am now :)
sleetdrop has quit [Quit: Computer has gone to sleep.]
postmodern has quit [Quit: Leaving]
Space has joined #cinch
space_ has quit [Ping timeout: 248 seconds]
<Donovan>
morning
<Donovan>
waxjar: I'm in the process of implementing your cinch-authentication gem, had some questions on the strategies, but I think I've got it worked out.
tennel has joined #cinch
<tennel>
hello, what's the way to execute a method after the bot has connected to the irc network? for example, monitor some users read from a file?
<waxjar>
Donovan: great :)
<waxjar>
tennel: there's a connect event, it must be in the Events file in the docs
sleetdrop has joined #cinch
v0n has joined #cinch
<tennel>
waxjar: ok, found it, but if i try to create "on :connect" in my plugin class, it says that there is no on method
<tennel>
shall i use liste_to :connect?
<waxjar>
plugins work differently, they have a match method
<tennel>
i have nothing to match
<waxjar>
oh yea, that's right. lol.
<waxjar>
listen_to then, yea
<tennel>
ok, thanks it worx
framling_ is now known as framling
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #cinch
Spami has quit [Changing host]
Spami has joined #cinch
Spami has quit [Ping timeout: 276 seconds]
Spami has joined #cinch
Spami has quit [Ping timeout: 248 seconds]
kaiks has quit [Ping timeout: 240 seconds]
kx has joined #cinch
Spami has joined #cinch
TheMonster has joined #cinch
<TheMonster>
I'm wondering how to let the bot send a message once it connects to a channel
Space has quit [Ping timeout: 256 seconds]
<kx>
you can listen to a join event and check if the joining user's nick is your nick
<TheMonster>
oh nice thinking, let me try this :)
<TheMonster>
it worked, thanks kx
<kx>
youre welcome :)
sleetdrop has quit [Quit: Computer has gone to sleep.]
TheMonster has quit [Ping timeout: 256 seconds]
TheMonster has joined #cinch
TheMonster has quit [Quit: Konversation terminated!]
v0n has quit [Ping timeout: 268 seconds]
<Donovan>
waxjar: okay, I lied. How do you tell it what authentication.strategy to use? I cannot seem to set it via the bot.new config
v0n has joined #cinch
v0n has quit [Client Quit]
<Donovan>
getting ye olde, undefined method `strategy=' for nil:NilClass (NoMethodError)
v0n has joined #cinch
<Donovan>
it's not loading the configuration/authentication.rb model
<Donovan>
nevermind, duh, I found it in the examples.
<Donovan>
waxjar: okay, now I am stuck. I'm getting the following error...
<Donovan>
cinchbot/gems/cinch-authentication-0.1.0/lib/cinch/extensions/authentication.rb:101:in `concat': no implicit conversion of nil into Array (TypeError)
<waxjar>
uh oh
<waxjar>
can you gist the code you're calling it with?
<Donovan>
sure, hold on I'm trying the latest from github
<Donovan>
if I still get the error, I'll paste it. It's pretty simple.
<Donovan>
yup, still getting it
<Donovan>
return unless authenticated? m, :admin
<Donovan>
that's the line triggering it
<Donovan>
from the code, it seemed like you could pass in a level to the authenticated? method
<dominikh>
I can only recommend using some parentheses there
<Donovan>
well, sure, okay, but that shouldn't cause a the runtime error.
<Donovan>
but I understand for readability
<dominikh>
depends how it's parsed :)
<Donovan>
true, I'll try it... can't hurt. =)
<Donovan>
also my match is not right, since it doesn't work without an argument (the space)
<Donovan>
oh, heh, nevermind I didn't past that part
<Donovan>
okay, trying agian now
<Donovan>
I need to figure out a good way to reload plugins without having to quit and restart the bot.
<Cinchy>
[gist] authentication configuration (at gist.github.com, dyoung522 on 2013-07-18 21:34)
<dominikh>
so.. admin vs admins?
<Donovan>
hmmm
<waxjar>
yup, dominikh's right :)
<Donovan>
it's admins in the example
<dominikh>
(and terrible error checking in cinch-authentication :P)
<Donovan>
but let me try single
<waxjar>
heh
<dominikh>
Donovan: point is, your config uses admins, your check uses admin. pick one.
<waxjar>
or simply use authenticated? m, :admins
<Donovan>
oh, duh
<Donovan>
yeah
* Donovan
facepalms
<dominikh>
(hell yeah, I still dem skills.)
<dominikh>
*got
<Donovan>
well, that was it... but still not working right.
<Donovan>
ConchBot (~conchbot@dev.redifloors.com): You are not authorized to run this command.
<Donovan>
but I can soldier on from here, I think. Not sure why it's not seeing me in the admins list though
<dominikh>
Donovan: you sure you spelled the authname to check right? :)
<dominikh>
case etc
<waxjar>
the list strategy relies on nickserv
<dominikh>
well, not just nickserv, but yeah :)
<dominikh>
on User#authname to be specific ;)
<Donovan>
dominikh: heh, yea I think so
<Donovan>
but maybe not... I just have [conch]
<Donovan>
which is my nick on the other server, where I'm testing
<dominikh>
the nick does not matter.
<Donovan>
oh, is it username?
<dominikh>
this is about the name you authenticate with to NickServ/Q/K/...
<Donovan>
ah
<Donovan>
so it's using /whois to obtain the authenticated as info, I guess?
<dominikh>
correct.
<Donovan>
hmmm... okay, I don't mean to be dense, but wouldn't that be the same as my nick?
<dominikh>
a) can be, doesn't have to be b) you have a nick even if you're not authenticated
<Donovan>
I mean, that's what's I've registered as and /whois just says [conch] has identified for this nick
<dominikh>
c) your nick isn't protected per se
Space has joined #cinch
<dominikh>
well if it IS the same then there's some other issue
<dominikh>
what network is that?
<Donovan>
dal.net
<dominikh>
oh boy.
<Donovan>
let me bring it on freenode
<Donovan>
yeah, I think you know what else I was thinking
<dominikh>
does DALnet even use nickserv from atheme or do they roll their own?
<Donovan>
dal.net uses nickserv@services.dal.net
<Donovan>
that, I don't know
<Donovan>
I may have to roll my own auth, using hostmask
<dominikh>
hm, 307
postmodern has joined #cinch
<dominikh>
should work.
<dominikh>
(and yes, on DALnet your nick and authname will always be identical if you're authenticated)
<dominikh>
Donovan: but your nick is Conch, not conch, isn't it?
<Donovan>
okay, then there's some other problem because it's not recognizing me as an admin (but if you see the gist I pasted), I'm hardcoded in there.
<Donovan>
yes
<Donovan>
but, surely it's not case sensitive? Hmmm
<dominikh>
of course it is case sensitive
<dominikh>
well, not really, no
<Donovan>
it shoulnd't be
<Donovan>
but yea, maybe it is. Let me try that.
<dominikh>
it's not, but for shit and giggles see if it does
<dominikh>
oh, actually it is
<Donovan>
yup. If so, then I'll monkey patch it (or ask waxjar nicely) to fix it
<dominikh>
nicks aren't case-sensitive, authnames are
<dominikh>
there's nothing he should fix there
<dominikh>
there might be systems where authnames are case-sensitive
<Donovan>
oh, I didn't realize authnames were case sensitive too
<dominikh>
when it's about security we're not going to make unsafe assumptions :)
<Donovan>
nevermind then. But still, I think i would prefer hostmask authentication, but we'll see
<Donovan>
that's a good policy.
* dominikh
closes 10 cinch-related tabs
<Donovan>
heh
<Donovan>
I know the feeling
<waxjar>
i've thought about hostmask based authentication, but i'm not really sure how to implement that exactly.
<Donovan>
waxjar: by the way, I am by no means saying your gem isn't nice, it's saved me a bunch of work.
<dominikh>
sounds trivial to implement to me; ignoring the fact that hostmask based auth is almost never what you want ;)
<waxjar>
people are not always connecting from the same host
<dominikh>
Donovan: really? it caused me a ton of work this evening :P
<Donovan>
HA
<waxjar>
lol
<Donovan>
I may end up liking this way better in the long run, hostmask was my first thought, since that's how most bots I've used work.
<Donovan>
yea, that was it. Case sensitivity. Working now.
<Donovan>
thanks guys!
<Donovan>
next up... add database ORM for user storage
<dominikh>
don't use AR.
<Donovan>
any recommendations?
<dominikh>
dunno. Sequel is nice, some use DM
<dominikh>
some stopped using DM :>
<Donovan>
I'll probably just use sqlite3 for ease of use
<Donovan>
I'll check out sequel
<dominikh>
well that's not an ORM anymore, that's a plain driver :)
<dominikh>
sqlite3 that is
<Donovan>
well, okay, true
<waxjar>
sequel looks really nice
<dominikh>
sequel is the orm that gets the least in your way
<Donovan>
yea, so for it looks perfect
<Donovan>
thinking forward here, dominikh, is there a cinch command to grab the authname given a nick?
<Donovan>
for adding to the list
<waxjar>
User("nickname").authname
v0n has quit [Read error: Operation timed out]
<Donovan>
sweet.
<dominikh>
doing that to populate your list also defies the point of authentication ;)
<Donovan>
how so? I mean, it would only be used by an admin command to add users to the appropriate list
<dominikh>
ah, never mind then.
<dominikh>
I thought you were going to use it at startup to map nick to authname
<Donovan>
something like, !useradd dominikh users
<Donovan>
oh, no. heh
<dominikh>
users? I demand my own group.
<Donovan>
=P
<Donovan>
I'm put a super sekret backdoor group that has you in it, so you can control any bot! Muahahahaaa... oh right, open source.
* Donovan
shakes his fist
<dominikh>
right, because people read the code they run. not.
<Donovan>
heh, true
<dominikh>
but great, now there are two backdoors.
<Donovan>
=)
Space is now known as Space
jonahR has joined #cinch
ColdBlooder has quit [Remote host closed the connection]