This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Cinch | |
module Plugins | |
class HelloBot | |
include Cinch::Plugin | |
set(:plugin_name => "Hello Bot", :help => 'Responds on "!hello"') | |
match "hello" | |
def execute(m) | |
m.reply "Hello #{m.user.nick}, my name is #{@bot.nick}!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Cinch | |
module Helpers | |
def check_user(channel, user, ignored_members=["v"]) | |
ignored_members ||= [] # If nil, assign an empty array. | |
users = Channel(channel).users # All users from supplied channel | |
modes = @bot.irc.isupport["PREFIX"].keys - ignored_members # | |
modes.any? {|mode| users[user].include?(mode)} | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Cinch | |
module Helpers | |
# Checks a user's access in the specified channel. | |
# @param channel [Channel, String] A Channel object or string that is the name of the channel. (i.e. #chat) | |
# @param user [User] A User object | |
# @param ignored_members [Array<String>] An array of modes that this method will ignore | |
# @return [Boolean] Returns True if the user has any channel modes other than the ignored modechars | |
# @author Mark Seymour/Azure <[email protected]> | |
def check_user(channel, user, ignored_members=["v"]) | |
ignored_members ||= [] # If nil, assign an empty array. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'socket' | |
require 'logger' | |
require 'logger/colors' | |
require 'thread' | |
Thread.abort_on_exception = true | |
class IRC | |
attr_reader :nick, :user, :gecos | |
attr_reader :server, :port | |
attr_reader :socket, :logger, :capabilities, :isupport, :casemapping |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Sussex | |
module Plugins | |
# This is just a class for laying out possible plugin ideas. | |
# I have been using Cinch for about a year and a half now, so I am quite | |
# biased in terms of plugin design for something like this... | |
# Note that I also use an include for including methods/etc. into the plugin | |
# There are probably other ways of doing this as well. | |
class MyPlugin | |
include Sussex::Plugin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2013-05-19 16:15:14] requirements_osx_brew_libs_install | |
requirements_osx_brew_libs_install () | |
{ | |
brew unlink "$@" && brew install "$@" || { | |
typeset ret=$?; | |
rvm_warn "There were package installation errors, make sure to read the log. | |
Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation"; | |
case "$_system_version" in | |
10.6) | |
rvm_warn "On OSX 10.6 instead of command line tools install: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2013/06/20 20:09:51.410] >> :[email protected] PRIVMSG #celestiaradio :I just can't remember what. | |
[2013/06/20 20:09:51.411] !! [New thread] For #<Cinch::Handler @event=:channel pattern=#<Cinch::Pattern:0x00000002c6e100 @prefix=nil, @pattern=//, @suffix=nil>>: #<Thread:0x007f142ca1f698> -- 1 in total. | |
[2013/06/20 20:09:51.416] !! [New thread] For #<Cinch::Handler @event=:channel pattern=#<Cinch::Pattern:0x00000002d273d0 @prefix=nil, @pattern=//, @suffix=nil>>: #<Thread:0x007f142ca1eef0> -- 1 in total. | |
[2013/06/20 20:09:51.416] !! [New thread] For #<Cinch::Handler @event=:channel pattern=#<Cinch::Pattern:0x00000001df4430 @prefix=nil, @pattern=//, @suffix=nil>>: #<Thread:0x007f142ca1d938> -- 1 in total. | |
[2013/06/20 20:09:51.416] !! [New thread] For #<Cinch::Handler @event=:channel pattern=#<Cinch::Pattern:0x00000001e5c030 @prefix=nil, @pattern=//, @suffix=nil>>: #<Thread:0x007f142ca1d438> -- 1 in total. | |
[2013/06/20 20:09:51.416] !! [New thread] For #<Cinch::Handler @event=:message patte |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Copyright © 2013 Mark Seymour ([email protected]) | |
on textualcmd() | |
tell application "System Events" | |
tell application "System Events" to set isRunning to exists (processes where name is "Cog") | |
set curpos to value of static text of group 2 of tool bar 1 of window of application process "Cog" | |
end tell | |
set listening to "/me np: " | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Regional Presidents Report", | |
"report_type": "club", | |
"form": [ | |
{ | |
"title": "Identification", | |
"items": [ | |
{ "type": "text", "label": "Full Name" }, | |
{ "type": "email", "label": "Email" }, | |
{ "type": "text", "label": "Club" }, |