Created
May 10, 2010 17:38
-
-
Save leejarvis/396294 to your computer and use it in GitHub Desktop.
This file contains 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
# TESTING - not current Cinch syntax | |
# part the current channel | |
bot.plugin "part" do |m| | |
m.channel.part | |
end | |
# With a part message | |
bot.plugin "part :message" do |m| | |
m.channel.part m.args[:message] | |
end | |
# Return a list of all channels | |
bot.plugin "chanlist" do |m| | |
m.reply bot.channels.to_a.join(', ') | |
end | |
# Kick a user | |
bot.plugin "kick :user" do |m| | |
m.channel.kick m.args[:user] | |
end | |
# The LONG method of sending a PRIVMSG | |
bot.plugin "say :text" do |m| | |
bot.channels[m.channel].privmsg m.args[:text] | |
end | |
# Return a list of all users in the current channel | |
bot.plugin "users" do |m| | |
m.reply m.channel.users.join(', ') | |
end | |
# Return a list of all users in a different channel | |
bot.plugin "users :chan" do |m| | |
m.reply bot.channels[m.args[:chan]].users.join(', ') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment