dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.0.9
space has quit [Read error: Connection reset by peer]
<zewelor> oh its already on stderr
<zewelor> how can i redirect default cinch output to dev/null ? i know i could redirect stderr from command line there, but maybe there is a better way ?
<zewelor> i just want to quiet cinch related stuff
postmodern has joined #cinch
robonerd has joined #cinch
sacc91 has joined #cinch
<dominikh> zewelor: you can do bot.loggers.clear to remove the default logger, but I advise against it. one day you'll need the logs
<robonerd> for what
<dominikh> for debugging bugs in your plugins?
[Rickmasta] has quit [Quit: Be back later]
rickmasta has joined #cinch
rickmasta has quit [Client Quit]
space has joined #cinch
space has quit [Changing host]
space has joined #cinch
postmodern has quit [Quit: Leaving]
space has quit [Remote host closed the connection]
UberDragon has quit [Quit: UberDragon]
<zewelor> dominikh: thanks works great, yes im aware of that but in this case i got super simple bot without any plugins, it just writes messages to channel when something occur and whole logic is outside of bot, i just write messages by bot.channels.first.msg "something"
AJ-Lee has joined #cinch
<AJ-Lee> Is there anyone on who can help me with something?
<zewelor> AJ-Lee: i think its best if you just ask question
<AJ-Lee> Well, I am wondering if it's possible to add multiple authnames to this syntax unless m.user.authname != "MyAuth";
<zewelor> maybe just craete array and check if authname is included in it ?
<AJ-Lee> I'm going to be straight-up honest with you, I don't know how to do that with this.
<AJ-Lee> I am a n00b and learning as I go.
<zewelor> can oyu paste more of the code around it ?
<zewelor> i think you can just change it to
<zewelor> if %w[MyAuth MyAuth1 whatever].include? m.user.authname
<AJ-Lee> http://pastebin.com/Dd62jD6i There you go.
<zewelor> try to change it as i wrote
<zewelor> and i dont think oyu need ; o nte end of a line
<AJ-Lee> Okay. Let me give it a shot :)
lnlyplnt has joined #cinch
<lnlyplnt> hey guys I have a question about multiple bots
<lnlyplnt> anybody around?
<AJ-Lee> zewelor: it worked
<AJ-Lee> Thank you!
<zewelor> AJ-Lee: great
<zewelor> lnlyplnt: well just ask if someone will be here he can anwser, if you wont write question its harder to answer
<zewelor> dont ask to ask just ask :)
<AJ-Lee> Now zewelor do you know how to get the bot to stop preappending "Quit:" in it's quit message?
<zewelor> i think its hardcoded
<dominikh> the IRCd adds that, not the bot.
<dominikh> to distinguish it from QUITs that the server caused (ping timeout and such)
<AJ-Lee> Ah okay, thanks dominikh
<lnlyplnt> Alright so I want to have sever bots running at the same time across several different servers
<lnlyplnt> right now I tried to instantiate a bunch of bots and add them to a bot_array
<lnlyplnt> then I wrote bot_array.each do |bot| {bot.start}
<lnlyplnt> but the first bot seems to be holding the loop
<dominikh> Bot#start blocks (for quite obvious reasons). you need to wrap each in its own thread.
<dominikh> and make sure to Thread#join them afterwards
<lnlyplnt> thread as in a different ruby thread?
<dominikh> as in Thread.new, yes.
<lnlyplnt> so I can do bot_array.each do |bot| {Thread.new {bot.star}}?
<dominikh> and since I said you'll want to Thread#join them, you need to store each thread somewhere
<dominikh> well, or do bot_array.map {|bot| Thread.new { bot.start }}.each {|t| t.join}
<lnlyplnt> let me try that real quick
AJ-Lee has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<lnlyplnt> ping
<lnlyplnt> dominikh thanks for that, I'm having one more problem that I can't seem to figure out
<lnlyplnt> I keep on getting this error: http://pastebin.com/jm9wDKfN
<dominikh> using the latest version of Cinch? (2.0.9)
<dominikh> also it looks like a plain buggy IRC server.
<lnlyplnt> yeah I'm using 2.0.9
<lnlyplnt> someone on SO suggested in a similar problem to add a
<lnlyplnt> \r\n to the pong
<dominikh> ... yeah, that suggestion isn't exactly going to help you
<dominikh> I'm not stupid, I know the IRC protocol, there are plenty of \r\n ;)
<dominikh> it's a buggy IRC server.
<lnlyplnt> ok
<lnlyplnt> thanks for the help
<dominikh> I can check in a minute if I can add a workaround, if they're not too weird
<lnlyplnt> that would be cool
<lnlyplnt> the server seems to work find in a traditional client
<dominikh> I'd bet that client isn't requesting any client capabilities
<lnlyplnt> (limechat if it matters...)
<lnlyplnt> this is what a succesful connect gets me: http://pastebin.com/1txT1VUp
<dominikh> well yeah, definitely a bug in that IRC server.
<dominikh> idiots.
<lnlyplnt> :( well thanks for the help
<dominikh> still looking into it.
<dominikh> I don't remember inspircd being that buggy though
<dominikh> lnlyplnt: install cinch-2.0.10
dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.0.10
<lnlyplnt> done one sec I'll test it out.
<lnlyplnt> hey works great
<lnlyplnt> what was it in the end?
<dominikh> when connecting, we request a list of client capabilities (IRC extensions) and request the specific ones we want. In the case of that server, we want none, so we send an empty request, which the specification allows and all other servers support. InspIRCd, however, ignores the request, which causes the registration process to stall
<dominikh> so now we explicitly end the cap negotiation when we don't want any
<lnlyplnt> ah cool.
kludge` has quit [Ping timeout: 246 seconds]
kludge` has joined #cinch
space has joined #cinch
rikai has quit [Ping timeout: 265 seconds]
rikai has joined #cinch
<lnlyplnt> pong
<lnlyplnt> is there any way to ensure that a different instance of a plugin class is created for each channel?
<dominikh> nope
<dominikh> just have per-channel state in your plugin
<lnlyplnt> k, would just making a separate bot accomplish this? or not even?
<lnlyplnt> (making a per channel state is smarter, I'm just wondering)
<dominikh> having one bot per channel is a silly idea. but sure.
<lnlyplnt> kk I just implemented a hash according to channel name
<lnlyplnt> is there a reason that I get nil for message.server?
zewelor has left #cinch ["-!- May the force be with You -!-"]
<lnlyplnt> same story for message.user.last_nick
<lnlyplnt> message.user.realname works though
<dominikh> last_nick will be nil if the user never changed its nick
<lnlyplnt> how can I get it's current nick then?
<dominikh> and Message#server will only be non-nil if the message was sent by the server, as opposed to a user
<dominikh> User#nick
<lnlyplnt> ah ok. is there any way to get to the server of the channel from the message?
<lnlyplnt> or from the plugin itself?
<dominikh> message.bot.config.server would be the one you set during configuration
<dominikh> or @bot really. no need to go through the Message object if you're writing plugins
<dominikh> @bot.config.server
<lnlyplnt> ok thanks
kith has joined #cinch
space_ has joined #cinch
space has quit [Ping timeout: 240 seconds]
lnlyplnt has quit [Remote host closed the connection]
space_ has quit [Ping timeout: 272 seconds]
AJ-Lee has joined #cinch
<AJ-Lee> Hello everyone! Alright, so I've got this plugin made to make my bot "oper up" on command. http://pastebin.com/SKNnEPQP Now I want to have it set an option, as to whether an o-line has been activated on the bot or if there is no o-line active. I want that option to come into play on commands in later plugins and on an !oper ON command. If the bot sees an option set that says OPER is already ON it will print that into the channel. Like; "I already have an o-line
<AJ-Lee> !". Is there a way to do this?
space has joined #cinch
space has quit [Read error: Connection reset by peer]