2013-12-09 19:05
dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.0.11
00:00
<
CM-Punk >
Alright, so if I have an array set up in check_user.rb, and that's set up as a helper, is there a way to easily have the bot send a message to every nick in that array?
00:03
davido has quit [Ping timeout: 256 seconds]
00:05
<
somasonic >
CM-Punk, nicks.each { |n| User(n).msg("hello") }
00:05
<
somasonic >
may want to flesh that out a bit
00:07
<
CM-Punk >
Would "n" be where I would put "check_user"?
00:08
<
somasonic >
i misunderstood your question, ignore me
00:09
<
CM-Punk >
That's the helper
00:10
<
somasonic >
CM-Punk, you can't access that array from outside of that method
00:10
<
somasonic >
you could make the users an attribute on the class
00:11
<
somasonic >
or define it elsewhere
00:11
<
somasonic >
in the script
00:11
<
CM-Punk >
Uhm...I do it all the time...
00:11
<
CM-Punk >
Like in that one
00:12
<
somasonic >
yeah you can call the method, but you can't get the array from within the method
00:13
<
CM-Punk >
Well I'd like it to be easily configurable, so it would need to be in one place, like the check_user is.
00:14
<
somasonic >
yes, so make a configuration module somewhere in your code that allows any part of your script to access all config variables easily
00:14
<
somasonic >
i.e. Config.get('nicks')
00:17
davido has joined #cinch
00:17
<
CM-Punk >
I am learning, but I'm not very very good yet. I don't understand how to do that somasonic.
00:17
<
CM-Punk >
I'm still trying to figure out turning parts of code on and off.
00:17
<
somasonic >
CM-Punk,
00:17
<
somasonic >
I can show you a very basic example
00:17
<
CM-Punk >
Yes, that's how I learn best.
00:22
<
Cinchy >
[pastie] #8551033 - Pastie (at pastie.org, on 2013-12-14 04:22)
00:22
<
somasonic >
CM-Punk, you can access MyConfig throughout the whole script
00:22
<
somasonic >
you need to place that code before you configure cinch or anything like that, not within any classes
00:23
davido has quit [Ping timeout: 252 seconds]
00:31
<
somasonic >
before line 21
00:31
<
somasonic >
would be good
00:35
<
CM-Punk >
Thank you somasonic
00:43
davido has joined #cinch
00:47
sabfer has joined #cinch
00:52
davido has quit [Ping timeout: 252 seconds]
00:53
<
CM-Punk >
somasonic I named my array Configuration.dispatch, and then put this in my plugin: m.user(Configuration.dispatch).notice
00:53
<
CM-Punk >
I'm guessing that's not right.
00:54
<
CM-Punk >
Because it says it has too many arguments.
00:57
<
CM-Punk >
I figured it out!
01:00
<
somasonic >
glad you figured it out
01:12
davido has joined #cinch
01:14
UberDragon has joined #cinch
01:21
davido has quit [Ping timeout: 256 seconds]
01:31
sabfer has quit [Remote host closed the connection]
01:41
davido has joined #cinch
01:47
davido has quit [Ping timeout: 252 seconds]
01:52
sabfer has joined #cinch
01:54
UberDragon has quit [Quit: UberDragon]
02:02
sabfer has quit [Remote host closed the connection]
02:07
davido has joined #cinch
02:13
davido has quit [Ping timeout: 256 seconds]
02:24
<
CM-Punk >
Is there a way for the bot to check if a user is in a channel without whoising them?
02:28
davido has joined #cinch
02:34
davido has quit [Ping timeout: 256 seconds]
02:48
davido has joined #cinch
02:54
davido has quit [Ping timeout: 252 seconds]
03:08
davido has joined #cinch
03:14
davido has quit [Ping timeout: 256 seconds]
03:28
davido has joined #cinch
03:34
davido has quit [Ping timeout: 252 seconds]
03:53
<
CM-Punk >
somasonic are you still here?
03:54
davido has joined #cinch
04:00
davido has quit [Ping timeout: 252 seconds]
04:14
Cinchy has quit [Ping timeout: 245 seconds]
04:14
Cinchy has joined #cinch
04:14
davido has joined #cinch
04:20
davido has quit [Ping timeout: 252 seconds]
04:34
davido has joined #cinch
04:39
<
catepillar >
CM-Punk: Channel("#channel").users.keys.include? "username"
04:40
davido has quit [Ping timeout: 256 seconds]
04:54
davido has joined #cinch
05:00
davido has quit [Ping timeout: 256 seconds]
05:20
davido has joined #cinch
05:21
Spami has quit [Quit: This computer has gone to sleep]
05:26
davido has quit [Ping timeout: 256 seconds]
05:40
davido has joined #cinch
05:46
davido has quit [Ping timeout: 256 seconds]
06:00
davido has joined #cinch
06:06
davido has quit [Ping timeout: 256 seconds]
06:20
davido has joined #cinch
06:26
davido has quit [Ping timeout: 252 seconds]
06:40
davido has joined #cinch
06:46
davido has quit [Ping timeout: 256 seconds]
07:00
davido has joined #cinch
07:06
davido has quit [Ping timeout: 256 seconds]
07:20
davido has joined #cinch
07:26
davido has quit [Ping timeout: 252 seconds]
07:32
cyrusdavid has quit [Ping timeout: 260 seconds]
07:38
cyrusdavid has joined #cinch
07:40
davido has joined #cinch
07:46
davido has quit [Ping timeout: 252 seconds]
08:00
davido has joined #cinch
08:01
cyrusdavid has quit [Ping timeout: 265 seconds]
08:06
davido has quit [Ping timeout: 252 seconds]
08:08
sabfer has joined #cinch
08:20
cyrusdavid has joined #cinch
08:20
davido has joined #cinch
08:26
davido has quit [Ping timeout: 252 seconds]
08:40
davido has joined #cinch
08:44
Azure has quit [Quit: My MBP went to sleep.]
08:46
davido has quit [Ping timeout: 252 seconds]
09:00
davido has joined #cinch
09:07
davido has quit [Ping timeout: 256 seconds]
09:27
davido has joined #cinch
09:33
davido has quit [Ping timeout: 256 seconds]
09:53
davido has joined #cinch
09:59
davido has quit [Ping timeout: 256 seconds]
10:13
davido has joined #cinch
10:19
davido has quit [Ping timeout: 256 seconds]
10:33
davido has joined #cinch
10:34
kludge` has quit [Ping timeout: 272 seconds]
10:38
kludge` has joined #cinch
10:39
davido has quit [Ping timeout: 252 seconds]
10:53
davido has joined #cinch
11:00
davido has quit [Ping timeout: 256 seconds]
11:20
davido has joined #cinch
11:26
davido has quit [Ping timeout: 252 seconds]
11:40
davido has joined #cinch
11:46
davido has quit [Ping timeout: 252 seconds]
12:00
davido has joined #cinch
12:07
davido has quit [Ping timeout: 252 seconds]
12:27
davido has joined #cinch
12:34
davido has quit [Ping timeout: 256 seconds]
12:54
davido has joined #cinch
13:00
davido has quit [Ping timeout: 252 seconds]
13:14
davido has joined #cinch
13:21
davido has quit [Ping timeout: 256 seconds]
13:36
davido has joined #cinch
13:42
davido has quit [Ping timeout: 256 seconds]
13:56
davido has joined #cinch
14:02
davido has quit [Ping timeout: 252 seconds]
14:16
davido has joined #cinch
14:22
davido has quit [Ping timeout: 252 seconds]
14:42
davido has joined #cinch
14:49
davido has quit [Ping timeout: 256 seconds]
15:09
davido has joined #cinch
15:15
davido has quit [Ping timeout: 256 seconds]
15:29
davido has joined #cinch
15:33
waxjar_ is now known as waxjar
15:35
davido has quit [Ping timeout: 252 seconds]
15:49
davido has joined #cinch
15:55
davido has quit [Ping timeout: 252 seconds]
15:56
Azure has joined #cinch
16:09
davido has joined #cinch
16:15
davido has quit [Ping timeout: 256 seconds]
16:29
davido has joined #cinch
16:35
davido has quit [Ping timeout: 252 seconds]
16:49
davido has joined #cinch
16:55
davido has quit [Ping timeout: 252 seconds]
17:09
davido has joined #cinch
17:15
davido has quit [Ping timeout: 256 seconds]
17:29
davido has joined #cinch
18:04
waxjar_ has joined #cinch
18:05
waxjar has quit [Ping timeout: 240 seconds]
18:05
postmodern has quit [Ping timeout: 240 seconds]
18:05
sabfer has quit [Ping timeout: 240 seconds]
18:05
Dwarf has quit [Ping timeout: 240 seconds]
18:06
Dwarf has joined #cinch
18:06
sabfer has joined #cinch
18:06
postmodern has joined #cinch
18:07
postmodern has joined #cinch
18:07
postmodern has quit [Changing host]
19:09
Azure has joined #cinch
19:31
Rennex_ has joined #cinch
19:32
somasonic has quit [Ping timeout: 250 seconds]
19:32
Rennex has quit [Ping timeout: 250 seconds]
19:32
somasonic_ has joined #cinch
19:32
somasonic_ is now known as somasonic
20:04
rikai_ is now known as rikai
20:04
rikai has quit [Changing host]
20:04
rikai has joined #cinch
21:11
Azure has quit [Quit: My MBP went to sleep.]
21:19
Azure has joined #cinch
21:35
Azure has joined #cinch
22:34
CM-Punk has joined #cinch
22:48
CM-Punk has joined #cinch
22:52
CM-Punk has quit [Client Quit]
22:52
CM-Punk has joined #cinch