Coder Social home page Coder Social logo

cloudbot's Introduction

CloudBot

CloudBot is a simple, fast, expandable open-source Python IRC Bot!

Project Status & A more updated CloudBot

CloudBot is currently unmaintained. The project possibly usable, but there are currently no developers building new features or fixing bugs.

There are several forks of CloudBot which you may want to use instead. These projects have much more work done on them, and are thus incompatible. If you already have a running CloudBot instance you will probably need to start over from scratch.

  • TotallyNotRobots/CloudBot : https://github.com/snoonetIRC/CloudBot

    This is a more active fork being created by members of Snoonet that might be a better option for your needs. Keep in mind that, as a project more than a thousand commits ahead of this one, if you already have a running CloudBot instance you will probably need to start over from scratch.

  • gonzobot : https://github.com/edwardslabs/CloudBot

If there are any other maintained forks of CloudBot, pull requests to add them to the README are welcome.

Getting CloudBot

There are currently two different branches of this repository, each with a different level of stability:

  • master (stable): This branch contains stable, tested code. This is the branch you should be using if you just want to run your own CloudBot! Build Status
  • python3.4 (unstable): This branch is where we test and develop new features. If you would like to help develop CloudBot, you can use this branch. Build Status

New releases will be pushed from python3.4 to master whenever we have a stable version to release. This should happen on a fairly regular basis, so you'll never be too far behind the latest improvements.

Installing CloudBot

Firstly, CloudBot will only run on Python 3.4 or higher. Because we use the asyncio module, you will not be able to use any other versions of Python.

To install CloudBot on *nix (linux, etc), see here

To install CloudBot on Windows, see here

Running CloudBot

Before you run the bot, rename config.default.json to config.json and edit it with your preferred settings. You can check if your JSON is valid using jsonlint.com!

Once you have installed the required dependencies and renamed the config file, you can run the bot! Make sure you are in the correct folder and run the following command:

python3.4 -m cloudbot

Note that you can also run the cloudbot/__main__.py file directly, which will work from any directory.

python3.4 CloudBot/cloudbot/__main__.py

Specify the path as /path/to/repository/cloudbot/main.py, where cloudbot is inside the repository directory.

Getting help with CloudBot

Documentation

The CloudBot documentation is currently somewhat outdated and may not be correct. If you need any help, please visit our IRC channel and we will be happy to assist you.

To write your own plugins, visit the Plugins Wiki Page.

More at the Wiki Main Page.

Support

The developers reside in #CloudBot on EsperNet and would be glad to help you.

If you think you have found a bug/have an idea/suggestion, please open an issue here on Github and contact us on IRC!

Example CloudBots

You can find a number of example bots in #CloudBot.

Changelog

See CHANGELOG.md

License

CloudBot is licensed under the GPL v3 license. The terms are as follows.

GPL V3

CloudBot

Copyright © 2011-2015 Luke Rogers / CloudBot Project

CloudBot is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

CloudBot is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with CloudBot.  If not, see <http://www.gnu.org/licenses/>.

This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com. GeoLite2 databases are distributed under the Creative Commons Attribution-ShareAlike 3.0 Unported License

Powered by wordnik

This product uses data from http://wordnik.com in accordance with the wordnik.com API terms of service.

cloudbot's People

Contributors

aaron1011 avatar abrackadabra avatar alchzh avatar antdking avatar bbeng89 avatar blaneyxyz avatar blha303 avatar chcmatt avatar daboross avatar dmptrluke avatar dsphat avatar edwardslabs avatar k0hax avatar ksaredfx avatar laxwashere avatar linuxdaemon avatar literalplus avatar nasonfish avatar neersighted avatar pangeacake avatar prplz avatar puffrfish avatar red-m avatar thenoodle68 avatar thetechman avatar thewisenerd avatar urbels avatar whocares-openscene avatar xxyy avatar zarthus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudbot's Issues

Issues with unicode and logging on Windows

[21:53:54][INFO] [esper:#dmptr] <Luke> .tw dmptrluke
[21:53:57][INFO] [esper:#dmptr] <Luke> .tw notch
[21:53:57][INFO] [esper] >> PRIVMSG #dmptr :(Luke) @�DmptrLuke� (Luke Rogers): @misscliks @LivinpinkSC2 @missharvey @AnnaProsser Halp, part 5 of the latest misscliks is private on youtube D: (1 day, 1 hour ago)
[21:53:58][INFO] [esper] >> PRIVMSG #dmptr :(Luke) ✓@�notch� (Markus Persson): @KyleMcCarthy lol good one lol (12 hours, 2 minutes ago)
--- Logging error ---
Traceback (most recent call last):
  File "C:\Python34\lib\logging\__init__.py", line 980, in emit
    stream.write(msg)
  File "C:\Python34\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2713' in position 63: character maps to <undefined>
Call stack:
  File "C:/Users/Luke/PycharmProjects/CloudBotRefresh/cloudbot/__main__.py", line 92, in <module>
    main()
  File "C:/Users/Luke/PycharmProjects/CloudBotRefresh/cloudbot/__main__.py", line 64, in main
    restart = cloudbot.run()
  File "C:\Users\Luke\PycharmProjects\CloudBotRefresh\cloudbot\bot.py", line 115, in run
    restart = self.loop.run_until_complete(self.stopped_future)
  File "C:\Python34\lib\asyncio\base_events.py", line 263, in run_until_complete
    self.run_forever()
  File "C:\Python34\lib\asyncio\base_events.py", line 236, in run_forever
    self._run_once()
  File "C:\Python34\lib\asyncio\base_events.py", line 1048, in _run_once
    handle._run()
  File "C:\Python34\lib\asyncio\events.py", line 119, in _run
    self._callback(*self._args)
  File "C:\Users\Luke\PycharmProjects\CloudBotRefresh\cloudbot\clients\irc.py", line 198, in _send
    logger.info("[{}] >> {}".format(self.readable_name, line))
Message: '[esper] >> PRIVMSG #dmptr :(Luke) ✓@\x02notch\x02 (Markus Persson): @KyleMcCarthy lol good one lol (12 hours, 2 minutes ago)'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
  File "C:\Python34\lib\logging\__init__.py", line 980, in emit
    stream.write(msg)
  File "C:\Python34\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2713' in position 63: character maps to <undefined>
Call stack:
  File "C:/Users/Luke/PycharmProjects/CloudBotRefresh/cloudbot/__main__.py", line 92, in <module>
    main()
  File "C:/Users/Luke/PycharmProjects/CloudBotRefresh/cloudbot/__main__.py", line 64, in main
    restart = cloudbot.run()
  File "C:\Users\Luke\PycharmProjects\CloudBotRefresh\cloudbot\bot.py", line 115, in run
    restart = self.loop.run_until_complete(self.stopped_future)
  File "C:\Python34\lib\asyncio\base_events.py", line 263, in run_until_complete
    self.run_forever()
  File "C:\Python34\lib\asyncio\base_events.py", line 236, in run_forever
    self._run_once()
  File "C:\Python34\lib\asyncio\base_events.py", line 1048, in _run_once
    handle._run()
  File "C:\Python34\lib\asyncio\events.py", line 119, in _run
    self._callback(*self._args)
  File "C:\Users\Luke\PycharmProjects\CloudBotRefresh\cloudbot\clients\irc.py", line 198, in _send
    logger.info("[{}] >> {}".format(self.readable_name, line))
Message: '[esper] >> PRIVMSG #dmptr :(Luke) ✓@\x02notch\x02 (Markus Persson): @KyleMcCarthy lol good one lol (12 hours, 2 minutes ago)'
Arguments: ()
[21:54:03][INFO] [esper:#dmptr] <Luke> o shit

Google Search API is long-depreciated

Big issue. The Google Search API we currently use is depreciated and was sceduled to be disabled months ago. Right now we are stuck in a bad place where the only real replacement is the Custom Search API which is a more complex service that costs real money for more then 100 queries daily.

So... we either use that, web scape, find a third party API, or switch to Bing.

XD

Twitter broken?

I have my API keys configured and copied exactly as they were from Cloudbot before I switched to CloudbotRefresh

INFO:cloudbot:[irc.com:#gaming] <FiZi> .twitter #canadastrong
DEBUG:cloudbot:Closing database session for tell:tellinput:threaded=True
DEBUG:cloudbot:Closing database session for history:chat_tracker:threaded=True
[20:16:15][ERROR] Error in hook twitter:twitter
Traceback (most recent call last):
  File "/data/apps/sa_cloudbot/CloudBotRefresh/cloudbot/plugin.py", line 365, in _execute_hook
    out = yield from self.bot.loop.run_in_executor(None, self._execute_hook_threaded, hook, event)
  File "/data/apps/sa_cloudbot/python/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/data/apps/sa_cloudbot/python/lib/python3.4/asyncio/tasks.py", line 285, in _wakeup
    value = future.result()
  File "/data/apps/sa_cloudbot/python/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/data/apps/sa_cloudbot/python/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/data/apps/sa_cloudbot/CloudBotRefresh/cloudbot/plugin.py", line 329, in _execute_hook_threaded
    return hook.function(*parameters)
  File "/data/apps/sa_cloudbot/CloudBotRefresh/plugins/twitter.py", line 120, in twitter
    tweet = random.choice(search)
  File "/data/apps/sa_cloudbot/python/lib/python3.4/random.py", line 256, in choice
    return seq[i]
KeyError: 1
ERROR:cloudbot:Error in hook twitter:twitter
Traceback (most recent call last):
  File "/data/apps/sa_cloudbot/CloudBotRefresh/cloudbot/plugin.py", line 365, in _execute_hook
    out = yield from self.bot.loop.run_in_executor(None, self._execute_hook_threaded, hook, event)
  File "/data/apps/sa_cloudbot/python/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/data/apps/sa_cloudbot/python/lib/python3.4/asyncio/tasks.py", line 285, in _wakeup
    value = future.result()
  File "/data/apps/sa_cloudbot/python/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/data/apps/sa_cloudbot/python/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/data/apps/sa_cloudbot/CloudBotRefresh/cloudbot/plugin.py", line 329, in _execute_hook_threaded
    return hook.function(*parameters)
  File "/data/apps/sa_cloudbot/CloudBotRefresh/plugins/twitter.py", line 120, in twitter
    tweet = random.choice(search)
  File "/data/apps/sa_cloudbot/python/lib/python3.4/random.py", line 256, in choice
    return seq[i]
KeyError: 1

Make this into a part of the LastFM plugin

@blha303 came up with this factoid in IRC, lets make it a command

import json,urllib2
input = input.split() if " " in input else ["blha303", input if input else nick]
d=json.loads(urllib2.urlopen("http://ws.audioscrobbler.com/2.0/?method=tasteometer.compare&type1=user&type2=user&value1={}&value2={}&api_key=390b9241e6d02df9f4a24c89784adb71&format=json".format(input[0], input[1])).read());
s=int(float(d["comparison"]["result"]["score"])*100)
a="super" if s > 95 else "very high" if s > 80 else "high" if s > 60 else "medium" if s > 40 else "low" if s > 10 else "very low"
artists = [f["name"] for f in d["comparison"]["result"]["artists"]["artist"]] if type(d["comparison"]["result"]["artists"]["artist"]) == list else [d["comparison"]["result"]["artists"]["artist"]["name"]] if "artist" in d["comparison"]["result"]["artists"] else ""
print "Musical compatibility between {} and {}: {} ({}%).".format(input[0], input[1], a.title(), s) + " Artists in common: {}".format(", ".join(artists) if artists else "")

error calling quote.py

I am seeing the following error whenever .quote add #channel username message is called

[07:50:43][ERROR] Error in hook quote:quote
Traceback (most recent call last):
  File "/home/andy/ircbot/CloudBotRefresh/plugins/quote.py", line 29, in add_quot
e
    (chan, nick, add_nick, msg, time.time()))
  File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/orm/session.py", line 9
91, in execute
    bind, close_with_result=True).execute(clause, params or {})
  File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/engine/base.py", line 7
29, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/sql/elements.py", line
321, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/engine/base.py", line 8
02, in _execute_clauseelement
    keys = distilled_params[0].keys()
AttributeError: 'tuple' object has no attribute 'keys'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/andy/ircbot/CloudBotRefresh/cloudbot/plugin.py", line 365, in _exec
ute_hook
    out = yield from self.bot.loop.run_in_executor(None, self._execute_hook_threa
ded, hook, event)
  File "/usr/lib/python3.4/asyncio/futures.py", line 348, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 351, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/andy/ircbot/CloudBotRefresh/cloudbot/plugin.py", line 329, in _exec
ute_hook_threaded
    return hook.function(*parameters)
  File "/home/andy/ircbot/CloudBotRefresh/plugins/quote.py", line 135, in quote
    notice(add_quote(db, chan, quoted_nick, nick, msg))
  File "/home/andy/ircbot/CloudBotRefresh/plugins/quote.py", line 31, in add_quot
e
    except db.IntegrityError:
AttributeError: 'Session' object has no attribute 'IntegrityError'
ERROR:cloudbot:Error in hook quote:quote
Traceback (most recent call last):
  File "/home/andy/ircbot/CloudBotRefresh/plugins/quote.py", line 29, in add_quot
e
    (chan, nick, add_nick, msg, time.time()))
  File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/orm/session.py", line 9
91, in execute
    bind, close_with_result=True).execute(clause, params or {})
File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/engine/base.py", line 729, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/sql/elements.py", line 321, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python3.4/dist-packages/sqlalchemy/engine/base.py", line 802, in _execute_clauseelement
    keys = distilled_params[0].keys()
AttributeError: 'tuple' object has no attribute 'keys'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/andy/ircbot/CloudBotRefresh/cloudbot/plugin.py", line 365, in _execute_hook
    out = yield from self.bot.loop.run_in_executor(None, self._execute_hook_threaded, hook, event)
  File "/usr/lib/python3.4/asyncio/futures.py", line 348, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 351, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/andy/ircbot/CloudBotRefresh/cloudbot/plugin.py", line 329, in _execute_hook_threaded
    return hook.function(*parameters)
  File "/home/andy/ircbot/CloudBotRefresh/plugins/quote.py", line 135, in quote
    notice(add_quote(db, chan, quoted_nick, nick, msg))
  File "/home/andy/ircbot/CloudBotRefresh/plugins/quote.py", line 31, in add_quote
    except db.IntegrityError:
AttributeError: 'Session' object has no attribute 'IntegrityError'

Stock plugin broken?

I get the help message from the bot when I don't include a stock ticker symbol. If I include a stock symbol I get no response.

[15:37:55][INFO] [irc.com:#gaming] <FiZi> .stock
DEBUG:cloudbot:Opening database session for tell:tellinput:threaded=True
INFO:cloudbot:[irc.com] >> NOTICE FiZi :.stock <symbol> -- gets stock information
INFO:cloudbot:[irc.com:#gaming] <FiZi> .stock
DEBUG:cloudbot:Closing database session for tell:tellinput:threaded=True
DEBUG:cloudbot:Closing database session for history:chat_tracker:threaded=True
DEBUG:cloudbot:Opening database session for history:chat_tracker:threaded=True
[15:38:02][ERROR] Plugin stock:stock asked for invalid argument 'inp', cancelling execution!
[15:38:02][INFO] [irc.com:#gaming] <FiZi> .stock bbry
DEBUG:cloudbot:Opening database session for tell:tellinput:threaded=True
ERROR:cloudbot:Plugin stock:stock asked for invalid argument 'inp', cancelling execution!
INFO:cloudbot:[irc.com:#gaming] <FiZi> .stock bbry
DEBUG:cloudbot:Closing database session for tell:tellinput:threaded=True
DEBUG:cloudbot:Valid arguments are: ['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'action', 'async', 'bot', 'chan', 'close', 'close_threaded', 'conn', 'content', 'ctcp', 'db', 'db_executor', 'event', 'has_permission', 'hook', 'host', 'irc_command', 'irc_ctcp_text', 'irc_paramlist', 'irc_prefix', 'irc_raw', 'logger', 'loop', 'mask', 'message', 'nick', 'notice', 'notice_doc', 'prepare', 'prepare_threaded', 'reply', 'target', 'text', 'triggered_command', 'type', 'user'] (<cloudbot.event.CommandEvent object at 0x7f3d7cf47b00>)
DEBUG:cloudbot:Closing database session for history:chat_tracker:threaded=True

IMDB fails to find some movies and causes an infinite link loop with more then one bot

We need to remove the URL from the link parser to avoid this

7:52 AM <+gv1222> .imdb the hobbit
7:52 AM <+Refract> (gv1222) The Hobbit (1977) (Animation, Adventure, Family): A homebody hobbit in Middle Earth gets talked into joining a quest with a group of dwarves to recover their treasure from a dragon. 90 min. 6.7/10 with 8,745 votes. http://www.imdb.com/title/tt0077687
7:52 AM <@CloudBot> (gv1222) The Hobbit (1977) (Animation, Adventure, Family): A homebody hobbit in Middle Earth gets talked into joining a quest with a group of dwarves to recover their treasure from a dragon. 90 min. 6.7/10 with 8,745 votes. http://www.imdb.com/title/tt0077687
7:52 AM <+Refract> (CloudBot) The Hobbit (1977) (Animation, Adventure, Family): A homebody hobbit in Middle Earth gets talked into joining a quest with a group of dwarves to recover their treasure from a dragon. 90 min. 6.7/10 with 8,745 votes. http://www.imdb.com/title/tt0077687
7:52 AM <@CloudBot> (Refract) The Hobbit (1977) (Animation, Adventure, Family): A homebody hobbit in Middle Earth gets talked into joining a quest with a group of dwarves to recover their treasure from a dragon. 90 min. 6.7/10 with 8,745 votes. http://www.imdb.com/title/tt0077687
7:52 AM <+Refract> (CloudBot) The Hobbit (1977) (Animation, Adventure, Family): A homebody hobbit in Middle Earth gets talked into joining a quest with a group of dwarves to recover their treasure from a dragon. 90 min. 6.7/10 with 8,745 votes. http://www.imdb.com/title/tt0077687
7:52 AM <@CloudBot> (Refract) The Hobbit (1977) (Animation, Adventure, Family): A homebody hobbit in Middle Earth gets talked into joining a quest with a group of dwarves to recover their treasure from a dragon. 90 min. 6.7/10 with 8,745 votes. http://www.imdb.com/title/tt0077687
7:52 AM <+Refract> (CloudBot) The Hobbit (1977) (Animation, Adventure, Family): A homebody hobbit in Middle Earth gets talked into joining a quest with a group of dwarves to recover their treasure from a dragon. 90 min. 6.7/10 with 8,745 votes. http://www.imdb.com/title/tt0077687
7:52 AM <@CloudBot> (Refract) The Hobbit (1977) (Animation, Adventure, Family): A homebody hobbit in Middle Earth gets talked into joining a quest with a group of dwarves to recover their treasure from a dragon. 90 min. 6.7/10 with 8,745 votes. http://www.imdb.com/title/tt0077687
7:52 AM <@CloudBot> (Refract) The Hobbit (1977) (Animation, Adventure, Family): A homebody hobbit in Middle Earth gets talked into joining a quest with a group of dwarves to recover their treasure from a dragon. 90 min. 6.7/10 with 8,745 votes. http://www.imdb.com/title/tt0077687
7:52 AM <+Refract> (CloudBot) The Hobbit (1977) (Animation, Adventure, Family): A homebody hobbit in Middle Earth gets talked into joining a quest with a group of dwarves to recover their treasure from a dragon. 90 min. 6.7/10 with 8,745 votes. http://www.imdb.com/title/tt0077687

In addition it seems to have trouble with some movie names. Will investigate

timed modes

is it possible to have the admin_channel.py have the ability to have timed modes.
you provide 30s and they will be banned, quieted, and mute and it will do said action for the specified amount of time then remove it.

Spotify plugin needs update for Refresh

INFO:cloudbot:[fizi.ca:#gaming] <FiZi> .spot july talk
ERROR:cloudbot:Plugin spotify:spotify asked for invalid argument 'inp', cancelling execution!
DEBUG:cloudbot:Valid arguments are: ['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'action', 'async', 'bot', 'chan', 'close', 'close_threaded', 'conn', 'content', 'ctcp', 'db', 'db_executor', 'event', 'has_permission', 'hook', 'host', 'irc_command', 'irc_ctcp_text', 'irc_paramlist', 'irc_prefix', 'irc_raw', 'logger', 'loop', 'mask', 'message', 'nick', 'notice', 'notice_doc', 'prepare', 'prepare_threaded', 'reply', 'target', 'text', 'triggered_command', 'type', 'user'] (<cloudbot.event.CommandEvent object at 0x7f84547159e8>)
DEBUG:cloudbot:Closing database session for history:chat_tracker:threaded=True
DEBUG:cloudbot:Closing database session for tell:tellinput:threaded=True

Wiki needs a major update

Both the development and config pages on the wiki are majorly outdated, they need to be rewritten

We need to limit reconnect attempts

Right now if the bot fails to connect to a network or loses connection, it continues trying to reconnect as fast as it possibly can. For obvious reasons, this can be a problem and lead to the network blocking connections, which results in even more connection attempts!

Wolframalpha string contains b''

(18:58:33) <@Zarthus> .wa test
(18:58:40) <Elissa> (Zarthus) Definitions: 1 | verb | put to the test, as for its quality, or give experimental use to 2 | verb | test or examine for the presence of disease or infection 3 | verb | examine someone's knowledge of something 4 | verb | show a certain characteristic... - http://is.gd/GPi84K

http://www.wolframalpha.com/input/?i=b%27test%27

This sometimes causes searches to be not found, confusing or inaccurate.

Proposal for connection refactoring and user tracking

Draft Proposal for Connection Refactoring and User Tracking

Okay, here we go

Firstly, I don't really like the separate client base class. It's not really needed since we pretty much gave up on support for multiple protocols.

I want to split up the irc package into a number of files for different functions, as detailed below:

irc>
    client.py - contains the Client class whichs owns a Protocol and a Tracker
    - protocol.py - has the IRCProtocol class
    - tracker.py - has the new Tracker class

    state.py - contains classes like User and Channel for other classes to use
    message.py - not entirely sure if we want to use this, but it's a class that abstracts IRC messages.   
                           Maybe we should combine this and state.py into models.py

The Beginning

My proposal for handling a received message is as follows:

  • IRCProtocol recieves a message, uses the Message class to parse it and passes on the Message to the Client.
  • The client then passes the Message to Tracker, waits for Tracker to finish working.
  • The tracker will return a User object representing the user who was tracked.
  • The client then creates an Event using the Message and User
  • The Event is executed using bot.process() as usual

(the reason for the separation is because we want to avoid the complexities and overhead of plugin execution for the tracker)

After this:

  • The tracker does tracking (detailed below)
  • and the bot continues the rest of the plugin execution as it did before

Introducing the Tracker Class

The tracker class is in charge of tracking users on IRC. It receives a Message with tracker.track() and will have functions for getting info on users.

Why is this not just part of the Client?

I decided to make this class separate to stop the Client code from getting too cluttered with extra stuff, mostly. One of the side goals of this proposal is to separate the IRC components into more logical blocks.

Why is this not just a plugin?

I don't want to make this a plugin because it needs to execute before all other plugins, and I want it to be accessable with the tracker arg in plugins, or conn.tracker.

What does Tracker listen for?

Tracker will listen for WHO replies, WHOIS replies, JOIN and PART commands, etc, and process them accordingly.

I have plans for this to be detailed soon. TBC

How will plugin developers use it?

Much like plugins can currently use chan and nick, they will be able to use user and channel. They can also access conn.tracker directly if they want to interface with it

Requesting feedback @daboross

GoogleURL plugin needs update for Refresh

[21:31:21] [INFO] [esper:dmod] <dmod> googleurl ci.builtborken.com
[21:31:21] [ERROR] Error in hook googleurlparse:googleurl
Traceback (most recent call last):
  File "C:\Users\Admin\Desktop\Mikes_stuff\bots\CloudBot\cloudbot\plugin.py", li
ne 366, in _execute_hook
    out = yield from self.bot.loop.run_in_executor(None, self._execute_hook_thre
aded, hook, event)
  File "C:\Python34\lib\asyncio\futures.py", line 348, in __iter__
    yield self  # This tells Task to wait for completion.
  File "C:\Python34\lib\asyncio\tasks.py", line 370, in _wakeup
    value = future.result()
  File "C:\Python34\lib\asyncio\futures.py", line 243, in result
    raise self._exception
  File "C:\Python34\lib\concurrent\futures\thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\Users\Admin\Desktop\Mikes_stuff\bots\CloudBot\cloudbot\plugin.py", li
ne 330, in _execute_hook_threaded
    return hook.function(*parameters)
  File "C:\Users\Admin\Desktop\Mikes_stuff\bots\CloudBot\plugins\googleurlparse.
py", line 13, in googleurl
    " like ? and chan = ?", (text.lower(), input.chan.lower())).fetchone()
AttributeError: 'builtin_function_or_method' object has no attribute 'chan'

Add new time plugin

The text parsing system I used for time_plugin.py is pretty awful. I think we need to ditch the command and just use a timezone-based system.

Enhance Ratelimiter

  • Add a second layer to the ratelimiter so it works per-user and per-channel
  • Replace the STRICT option with a system that ignore input for offending entities for X seconds.

Hook.commands can only be lowercase

When testing out a new command Luke and i found out that commands have to be lowercase for cloudbot to output even tho its says its loaded.

@hook.command("ForgeGradle", "FG")
def FG(message):
    message("What is ForgeGradle?");
    message("ForgeGradle is made by AbrarSyed. It allows forge to work with gradle and make modding Minecraft easier.")
    message("If you would like to help make it easier please feel free to help https://github.com/MinecraftForge/ForgeGradle.")
    return

This will not work if you type .fg or even .FG

https://www.irccloud.com/pastebin/AiCt9pOF
^lowercase

socket.gaierror: [Errno -2] Name or service not known

I can't seem to be able to use the latest version of this repository, older versions (e.g. fea70da) work fine but the latest one gives me this error when connecting:

[19:26:14][INFO] [irc] Connecting
Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/bot/CloudBotRefresh/cloudbot/__main__.py", line 92, in <module>
    main()
  File "/home/bot/CloudBotRefresh/cloudbot/__main__.py", line 64, in main
    restart = cloudbot.run()
  File "/home/bot/CloudBotRefresh/cloudbot/bot.py", line 113, in run
    self.loop.run_until_complete(self._init_routine())
  File "/usr/lib/python3.4/asyncio/base_events.py", line 208, in run_until_complete
    return future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/lib/python3.4/asyncio/tasks.py", line 298, in _step
    result = coro.throw(exc)
  File "/home/bot/CloudBotRefresh/cloudbot/bot.py", line 188, in _init_routine
    yield from asyncio.gather(*[conn.connect() for conn in self.connections], loop=self.loop)
  File "/usr/lib/python3.4/asyncio/futures.py", line 348, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 351, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/lib/python3.4/asyncio/tasks.py", line 300, in _step
    result = coro.send(value)
  File "/home/bot/CloudBotRefresh/cloudbot/clients/irc.py", line 104, in connect
    lambda: _IrcProtocol(self), host=self.server, port=self.port, ssl=self.ssl_context, local_addr=self.local_bind)
  File "/usr/lib/python3.4/asyncio/base_events.py", line 385, in create_connection
    laddr_infos = f2.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.4/socket.py", line 530, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

Am I doing something wrong?

Sort out how documentation works

It's a little confusing that we keep some docs in the repo as markdown files, and keep some on the wiki. What should we do about this?

add functions to colors.py like bold(), color(), italic()

I seem to be really attached to Willie.. I think it could be a good idea to have the formatting module Willie has:

# coding=utf8
"""*Availability: 4.5+*

The formatting module includes functions to apply IRC formatting to text."""
# Copyright 2014, Edward D. Powell, embolalia.net
# Licensed under the Eiffel Forum License 2.
from __future__ import unicode_literals
import sys
if sys.version_info.major >= 3:
    unicode = str

# Color names are as specified at http://www.mirc.com/colors.html

CONTROL_NORMAL = '\x0f'
"""The control code to reset formatting"""
CONTROL_COLOR = '\x03'
"""The control code to start or end color formatting"""
CONTROL_UNDERLINE = '\x1f'
"""The control code to start or end underlining"""
CONTROL_BOLD = '\x02'
"""The control code to start or end bold formatting"""
CONTROL_ITALIC = '\x1D'
"""The control code to start or end italic formatting"""


# TODO when we can move to 3.3+ completely, make this an Enum.
class colors:
    WHITE = '00'
    BLACK = '01'
    BLUE = '02'
    NAVY = BLUE
    GREEN = '03'
    RED = '04'
    BROWN = '05'
    MAROON = BROWN
    PURPLE = '06'
    ORANGE = '07'
    OLIVE = ORANGE
    YELLOW = '08'
    LIGHT_GREEN = '09'
    LIME = LIGHT_GREEN
    TEAL = '10'
    LIGHT_CYAN = '11'
    CYAN = LIGHT_CYAN
    LIGHT_BLUE = '12'
    ROYAL = LIGHT_BLUE
    PINK = '13'
    LIGHT_PURPLE = PINK
    FUCHSIA = PINK
    #TODO GREY and/or GRAY?
    GREY = '14'
    LIGHT_GREY = '15'
    SILVER = LIGHT_GREY


def _get_color(color):
    if color is None:
        return None

    # You can pass an int or string of the code
    try:
        color = int(color)
    except ValueError:
        pass
    if isinstance(color, int):
        if color > 99:
            raise ValueError('Can not specify a color above 99.')
        return unicode(color).rjust(2, '0')

    # You can also pass the name of the color
    color_name = color.upper()
    color_dict = colors.__dict__
    try:
        return color_dict[color_name]
    except KeyError:
        raise ValueError('Unknown color name {}'.format(color))


def color(text, fg=None, bg=None):
    """Return the text, with the given colors applied in IRC formatting.

    The color can be a string of the color name, or an integer between 0 and
    99. The known color names can be found in the `colors` class of this
    module."""
    if not fg and not bg:
        return text

    fg = _get_color(fg)
    bg = _get_color(bg)

    if not bg:
        text = ''.join([CONTROL_COLOR, fg, text, CONTROL_COLOR])
    else:
        text = ''.join([CONTROL_COLOR, fg, ',', bg, text, CONTROL_COLOR])
    return text


def bold(text):
    """Return the text, with bold IRC formatting."""
    return ''.join([CONTROL_BOLD, text, CONTROL_BOLD])


def underline(text):
    """Return the text, with underline IRC formatting."""
    return ''.join([CONTROL_UNDERLINE, text, CONTROL_UNDERLINE])


def italic(text):
    """Return the text, with italic IRC formatting."""
    return ''.join([CONTROL_ITALIC, text, CONTROL_ITALIC])

Automatic Updates

I've got a script accomplishing this right now but it would be great if the bot could automatically 'git pull' itself on a schedule and if plugins are updated nothing happens but if core files are updated it restarts itself.

Here's what I've got for my bash script

#!/bin/bash
. ~/.bash_profile
. ~/.bashrc

cloudBotPID=`pgrep -f CloudbotRefresh`
if [ -n "$cloudBotPID" ]
then
        kill $cloudBotPID
fi

pip3 freeze --local | grep -v '^\-e' | cut -d = -f 1  | xargs pip3 install -U
pip3 install -r ~/CloudBotRefresh/requirements.txt

cd CloudBotRefresh/
git pull

tmux new -s CloudbotRefresh -d 'python3 -m cloudbot'

sed plugin (correction.py) fails to format /me actions properly.

Example:

  * Xor consoles Suddenly but wraping his soft tail around his neck
 <Xor> s/but/by
 <+CafeBabe> Correction, <Xor> /me consoles Suddenly by wraping his soft tail around his neck

Expected behavior:

  * Xor consoles Suddenly but wraping his soft tail around his neck
 <Xor> s/but/by
 <+CafeBabe> Correction, * Xor consoles Suddenly by wraping his soft tail around his neck

gitdb doesn't exist for python3

Hi.

I updated my bot to latest version, and wanted to add some API keys like to the weather.

But when i started my server i got this error.

[23:19:54][ERROR] Error loading update.py:
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/GitPython-0.3.1-py3.4.egg/git/__init__.py", line 20, in _init_externals
    import gitdb
ImportError: No module named 'gitdb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/zyxep/phalconphpBot/cloudbot/plugin.py", line 144, in load_plugin
    plugin_module = importlib.import_module(module_name)
  File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2231, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2214, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2203, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1448, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/home/zyxep/phalconphpBot/plugins/update.py", line 1, in <module>
    from git import Repo
  File "/usr/local/lib/python3.4/dist-packages/GitPython-0.3.1-py3.4.egg/git/__init__.py", line 28, in <module>
    _init_externals()
  File "/usr/local/lib/python3.4/dist-packages/GitPython-0.3.1-py3.4.egg/git/__init__.py", line 22, in _init_externals
    raise ImportError("'gitdb' could not be found in your PYTHONPATH")
ImportError: 'gitdb' could not be found in your PYTHONPATH

this is my whole startup

$ python3.4 -m cloudbot
CloudBot3 <http://git.io/refresh>
[23:19:53][INFO] Enabling developer option: config reloading.
[23:19:53][INFO] Enabling developer option: file debug
[23:19:53][INFO] [freenode] Created permission manager for freenode.
[23:19:53][INFO] [freenode] Reloading permissions for freenode.
[23:19:53][INFO] Loaded command weather from weather.py
[23:19:53][INFO] Loaded command xkcd from xkcd.py
[23:19:53][INFO] Loaded regex xkcd_url from xkcd.py
[23:19:53][INFO] Registering tables for factoids
[23:19:53][INFO] Loaded command choose from choose.py
[23:19:53][INFO] Loaded command debug from debug.py
[23:19:53][INFO] Loaded command wiki/w/wikipedia from wikipedia.py
[23:19:53][INFO] Loaded command memory from system.py
[23:19:53][INFO] Loaded command uptime from system.py
[23:19:53][INFO] Loaded command pid from system.py
[23:19:53][INFO] Loaded command system from system.py
[23:19:53][INFO] Loaded command domain/domainr from domainr.py
[23:19:53][INFO] Loaded command help from help.py
[23:19:54][INFO] Loaded command mlia from mlia.py
[23:19:54][INFO] Loaded command mcping/mcp from minecraft_ping.py
[23:19:54][INFO] Loaded command rt from rottentomatoes.py
[23:19:54][INFO] Loaded command reddit from reddit.py
[23:19:54][INFO] Loaded regex reddit_url from reddit.py
[23:19:54][INFO] Loaded command urban/u from urban.py
[23:19:54][INFO] Loaded command isup from pagecheck.py
[23:19:54][INFO] Loaded command down/offline/up from pagecheck.py
[23:19:54][INFO] Loaded command coin from coin.py
[23:19:54][INFO] Loaded command potato from foods.py
[23:19:54][INFO] Loaded command cookie from foods.py
[23:19:54][INFO] Loaded command cake from foods.py
[23:19:54][INFO] Loaded command imdb from imdb.py
[23:19:54][INFO] Loaded regex imdb_url from imdb.py
[23:19:54][INFO] Loaded command beats from time_plugin.py
[23:19:54][INFO] Loaded command time from time_plugin.py
[23:19:54][INFO] Loaded regex ctcp_ping from core_ctcp.py
[23:19:54][INFO] Loaded regex ctcp_version from core_ctcp.py
[23:19:54][INFO] Loaded regex ctcp_time from core_ctcp.py
[23:19:54][INFO] Loaded command quote/q from quote.py
[23:19:54][INFO] Loaded command googleurl from googleurlparse.py
[23:19:54][INFO] Loaded command mcstatus from minecraft_status.py
[23:19:54][INFO] Loaded command word from wordoftheday.py
[23:19:54][INFO] Loaded command mcuser/haspaid/mcpaid from minecraft_user.py
[23:19:54][INFO] Loaded command rb from rss.py
[23:19:54][INFO] Loaded command rss/feed from rss.py
[23:19:54][INFO] Registering tables for regex_chans
[23:19:54][INFO] Loaded command ping from ping.py
[23:19:54][INFO] Loaded command recipe from recipe.py
[23:19:54][INFO] Loaded command dinner from recipe.py
[23:19:54][INFO] Loaded sieve sieve_suite from core_sieve.py
[23:19:54][INFO] Loaded command roll/dice from dice.py
[23:19:54][INFO] Loaded irc raw on_kick (KICK) from core_tracker.py
[23:19:54][INFO] Loaded irc raw on_join (JOIN) from core_tracker.py
[23:19:54][INFO] Loaded irc raw on_nick (NICK) from core_tracker.py
[23:19:54][INFO] Loaded command namegen from namegen.py
[23:19:54][INFO] Loaded command metacritic/mc from metacritic.py
[23:19:54][INFO] Loaded command imgur from imgur.py
[23:19:54][INFO] Loaded command spotify/sptrack from spotify.py
[23:19:54][INFO] Loaded command spalbum from spotify.py
[23:19:54][INFO] Loaded command spartist from spotify.py
[23:19:54][INFO] Loaded regex spotify_url from spotify.py
[23:19:54][INFO] Loaded command wa/wolframalpha/calc/math from wolframalpha.py
[23:19:54][INFO] Loaded command password from password.py
[23:19:54][INFO] Loaded command rpass/rpassword/readablepassword from password.py
[23:19:54][INFO] Loaded command mccraft/mcrecipe from minecraft_items.py
[23:19:54][INFO] Loaded command mcitem/mcid from minecraft_items.py
[23:19:54][INFO] Loaded command slap from slap.py
[23:19:54][INFO] Loaded command portal2dlc from valvesounds.py
[23:19:54][INFO] Loaded command portalmusic/portal1music from valvesounds.py
[23:19:54][INFO] Loaded command portal2 from valvesounds.py
[23:19:54][INFO] Loaded command tf2sound/tf2 from valvesounds.py
[23:19:54][INFO] Loaded command tf2music from valvesounds.py
[23:19:54][INFO] Loaded command portal2music from valvesounds.py
[23:19:54][INFO] Loaded command portal2dlc2/portal2pti from valvesounds.py
[23:19:54][INFO] Loaded command portal/portal1 from valvesounds.py
[23:19:54][INFO] Loaded command validate/w3c from validate.py
[23:19:54][INFO] Loaded command mcwiki from minecraft_wiki.py
[23:19:54][INFO] Loaded command slogan from slogan.py
[23:19:54][INFO] Loaded command suggest from suggest.py
[23:19:54][INFO] Loaded command drama from drama.py
[23:19:54][INFO] Loaded command pre/scene from scene.py
[23:19:54][INFO] Loaded command osrc from osrc.py
[23:19:54][INFO] Loaded regex vimeo_url from vimeo.py
[23:19:54][INFO] Loaded command fact from fact.py
[23:19:54][INFO] Loaded command e/etymology from dictionary.py
[23:19:54][INFO] Loaded command dictionary/define from dictionary.py
[23:19:54][INFO] Loaded command qrcode/qr from qrcode.py
[23:19:54][INFO] Loaded command steam from steam.py
[23:19:54][INFO] Loaded regex steam_url from steam.py
[23:19:54][INFO] Loaded command hulu from hulu.py
[23:19:54][INFO] Loaded regex hulu_url from hulu.py
[23:19:54][INFO] Loaded command ltc/litecoin from cryptocoins.py
[23:19:54][INFO] Loaded command btc/bitcoin from cryptocoins.py
[23:19:54][INFO] Loaded command seen from history.py
[23:19:54][INFO] Loaded command resethistory from history.py
[23:19:54][INFO] Loaded event chat_tracker (EventType.action,EventType.message) from history.py
[23:19:54][INFO] Loaded command rdio from rdio.py
[23:19:54][INFO] Loaded command rdiot from rdio.py
[23:19:54][INFO] Loaded command rdioar from rdio.py
[23:19:54][INFO] Loaded command rdioal from rdio.py
[23:19:54][INFO] Loaded regex rdio_url from rdio.py
[23:19:54][INFO] Loaded command newegg from newegg.py
[23:19:54][INFO] Loaded regex newegg_url from newegg.py
[23:19:54][INFO] Loaded command reverse from utility.py
[23:19:54][INFO] Loaded command swapcase from utility.py
[23:19:54][INFO] Loaded command unescape from utility.py
[23:19:54][INFO] Loaded command hash from utility.py
[23:19:54][INFO] Loaded command upper from utility.py
[23:19:54][INFO] Loaded command base64 from utility.py
[23:19:54][INFO] Loaded command wrainbow from utility.py
[23:19:54][INFO] Loaded command escape from utility.py
[23:19:54][INFO] Loaded command titlecase from utility.py
[23:19:54][INFO] Loaded command capitalise/capitalize from utility.py
[23:19:54][INFO] Loaded command rot13 from utility.py
[23:19:54][INFO] Loaded command isbase64/checkbase64 from utility.py
[23:19:54][INFO] Loaded command munge from utility.py
[23:19:54][INFO] Loaded command superscript from utility.py
[23:19:54][INFO] Loaded command rainbow from utility.py
[23:19:54][INFO] Loaded command debase64/unbase64 from utility.py
[23:19:54][INFO] Loaded command usa from utility.py
[23:19:54][INFO] Loaded command lower from utility.py
[23:19:54][INFO] Loaded command length from utility.py
[23:19:54][INFO] Loaded command steamcalc/sc from steam_calc.py
[23:19:54][INFO] Loaded command cypher from cypher.py
[23:19:54][INFO] Loaded command decypher from cypher.py
[23:19:54][INFO] Loaded command plpaste from plpaste.py
[23:19:54][INFO] Loaded command armory/armoury from wow.py
[23:19:54][INFO] Loaded command translate from google_translate.py
[23:19:54][INFO] Loaded command answer from yahooanswers.py
[23:19:54][INFO] Loaded command issues from github.py
[23:19:54][INFO] Loaded command snopes from snopes.py
[23:19:54][INFO] Loaded irc raw onjoin (004) from core_misc.py
[23:19:54][INFO] Loaded irc raw keep_alive (004) from core_misc.py
[23:19:54][INFO] Loaded irc raw invite (INVITE) from core_misc.py
[23:19:54][INFO] Loaded command unban from op.py
[23:19:54][INFO] Loaded command ban from op.py
[23:19:54][INFO] Loaded command deop from op.py
[23:19:54][INFO] Loaded command unquiet from op.py
[23:19:54][INFO] Loaded command lock from op.py
[23:19:54][INFO] Loaded command devoice from op.py
[23:19:54][INFO] Loaded command voice from op.py
[23:19:54][INFO] Loaded command mute from op.py
[23:19:54][INFO] Loaded command unmute from op.py
[23:19:54][INFO] Loaded command op from op.py
[23:19:54][INFO] Loaded command quiet from op.py
[23:19:54][INFO] Loaded command remove from op.py
[23:19:54][INFO] Loaded command kick from op.py
[23:19:54][INFO] Loaded command unlock from op.py
[23:19:54][INFO] Loaded command topic from op.py
[23:19:54][INFO] Loaded command lmgtfy/gfy from lmgtfy.py
[23:19:54][INFO] Loaded command kernel from kernel.py
[23:19:54][INFO] Loaded command raw from admin.py
[23:19:54][INFO] Loaded command uperms from admin.py
[23:19:54][INFO] Loaded command gusers from admin.py
[23:19:54][INFO] Loaded command cycle from admin.py
[23:19:54][INFO] Loaded command join from admin.py
[23:19:54][INFO] Loaded command groups/permgroups/listgroups from admin.py
[23:19:54][INFO] Loaded command nick from admin.py
[23:19:54][INFO] Loaded command say from admin.py
[23:19:54][INFO] Loaded command message/sayto from admin.py
[23:19:54][INFO] Loaded command adduser from admin.py
[23:19:54][INFO] Loaded command restart from admin.py
[23:19:54][INFO] Loaded command me/act from admin.py
[23:19:54][INFO] Loaded command deluser from admin.py
[23:19:54][INFO] Loaded command ugroups from admin.py
[23:19:54][INFO] Loaded command stop/quit from admin.py
[23:19:54][INFO] Loaded command gperms from admin.py
[23:19:54][INFO] Loaded command part from admin.py
[23:19:54][INFO] Loaded regex correction from correction.py
[23:19:54][INFO] Loaded command python/py from python.py
[23:19:54][INFO] Loaded command note/notes from notes.py
[23:19:54][INFO] Loaded regex newgrounds_url from newgrounds.py
[23:19:54][INFO] Loaded command youtime/ytime from youtube.py
[23:19:54][INFO] Loaded command youtube/y/you/yt from youtube.py
[23:19:54][INFO] Loaded regex youtube_url from youtube.py
[23:19:54][INFO] Loaded regex ytplaylist_url from youtube.py
[23:19:54][INFO] Loaded command googleimage/image/gis from google.py
[23:19:54][INFO] Loaded command google/search/g from google.py
[23:19:54][ERROR] Error loading update.py:
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/GitPython-0.3.1-py3.4.egg/git/__init__.py", line 20, in _init_externals
    import gitdb
ImportError: No module named 'gitdb'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/zyxep/phalconphpBot/cloudbot/plugin.py", line 144, in load_plugin
    plugin_module = importlib.import_module(module_name)
  File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2231, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2214, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2203, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1448, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/home/zyxep/phalconphpBot/plugins/update.py", line 1, in <module>
    from git import Repo
  File "/usr/local/lib/python3.4/dist-packages/GitPython-0.3.1-py3.4.egg/git/__init__.py", line 28, in <module>
    _init_externals()
  File "/usr/local/lib/python3.4/dist-packages/GitPython-0.3.1-py3.4.egg/git/__init__.py", line 22, in _init_externals
    raise ImportError("'gitdb' could not be found in your PYTHONPATH")
ImportError: 'gitdb' could not be found in your PYTHONPATH
[23:19:54][INFO] Loaded command stock from stock.py
[23:19:54][INFO] Loaded command twviewers/twitchviewers from twitch.py
[23:19:54][INFO] Loaded regex twitch_url from twitch.py
[23:19:54][INFO] Loaded regex multitwitch_url from twitch.py
[23:19:54][INFO] Registering tables for tell
[23:19:54][INFO] Registering tables for dbtest
[23:19:54][INFO] Loaded command spell from spellcheck.py
[23:19:54][INFO] Loaded command title from title.py
[23:19:54][INFO] Loaded command brainfuck/bf from brainfuck.py
[23:19:54][INFO] Loaded command tv/tv_next from tvdb.py
[23:19:54][INFO] Loaded command tv_prev/tv_last from tvdb.py
[23:19:54][INFO] Loaded command lyrics from lyrics.py
[23:19:54][INFO] Loaded command bans/fishbans from fishbans.py
[23:19:54][INFO] Loaded command bancount from fishbans.py
[23:19:54][INFO] Loaded command lastfm/l from lastfm.py
[23:19:54][INFO] Loaded regex soundcloud_url from soundcloud.py
[23:19:54][INFO] Loaded regex sndsc_url from soundcloud.py
[23:19:54][INFO] Loaded command flushlog from log.py
[23:19:54][INFO] Loaded irc raw console_log (*) from log.py
[23:19:54][INFO] Loaded irc raw log (*) from log.py
[23:19:54][INFO] Loaded irc raw log_raw (*) from log.py
[23:19:54][INFO] Loaded command expand from shorten.py
[23:19:54][INFO] Loaded command isgd from shorten.py
[23:19:54][INFO] Loaded command googl from shorten.py
[23:19:54][INFO] Loaded command gitio from shorten.py
[23:19:54][INFO] Loaded command shorten from shorten.py
[23:19:54][INFO] Loaded command twitter/tw/twatter from twitter.py
[23:19:54][INFO] Loaded command twuser/twinfo from twitter.py
[23:19:54][INFO] Loaded regex twitter_url from twitter.py
[23:19:54][INFO] Loaded command lart from attacks.py
[23:19:54][INFO] Loaded command insult from attacks.py
[23:19:54][INFO] Loaded command kill from attacks.py
[23:19:54][INFO] Loaded command flirt from attacks.py
[23:19:54][INFO] Loaded command fortune from fortune.py
[23:19:54][INFO] Loaded command 8ball/8/eightball from eightball.py
[23:19:54][INFO] Loaded command horoscope from horoscope.py
[23:19:54][INFO] Loaded command ignored from ignore.py
[23:19:54][INFO] Loaded command unignore from ignore.py
[23:19:54][INFO] Loaded command ignore from ignore.py
[23:19:54][INFO] Loaded sieve ignore_sieve from ignore.py
[23:19:54][INFO] Loaded command decrypt from encrypt.py
[23:19:54][INFO] Loaded command encrypt from encrypt.py
[23:19:54][INFO] Loaded command pymdiff from profiling.py
[23:19:54][INFO] Loaded command objgrowth from profiling.py
[23:19:54][INFO] Loaded command objtypes from profiling.py
[23:19:54][INFO] Loaded command pymsummary from profiling.py
[23:19:54][INFO] Loaded command threaddump from profiling.py
[23:19:54][INFO] Loaded command geoip from geoip.py
[23:19:54][INFO] Loaded command tell from tell.py
[23:19:54][INFO] Loaded command showtells from tell.py
[23:19:54][INFO] Loaded event tellinput (EventType.message) from tell.py
[23:19:54][INFO] Loaded command dbadduser from dbtest.py
[23:19:54][INFO] Loaded command select from dbtest.py
[23:19:54][INFO] Loaded command disableregex from regex_chans.py
[23:19:54][INFO] Loaded command enableregex from regex_chans.py
[23:19:54][INFO] Loaded command regexstatus from regex_chans.py
[23:19:54][INFO] Loaded command resetregex from regex_chans.py
[23:19:54][INFO] Loaded command listregex from regex_chans.py
[23:19:54][INFO] Loaded sieve sieve_regex from regex_chans.py
[23:19:54][INFO] Loaded command listfactoids from factoids.py
[23:19:54][INFO] Loaded command info from factoids.py
[23:19:54][INFO] Loaded command f/forget from factoids.py
[23:19:54][INFO] Loaded command r/remember from factoids.py
[23:19:54][INFO] Loaded regex factoid from factoids.py
[23:19:55][INFO] Loaded command bukget/plugin from minecraft_bukget.py
[23:19:55][INFO] Loaded command randomplugin from minecraft_bukget.py
[23:19:55][INFO] Loaded command fml from fmylife.py
[23:19:55][INFO] [freenode] Connecting
[23:19:55][INFO] [freenode] >> NICK :phalconphp
[23:19:55][INFO] [freenode] >> USER phalconphp 3 * :CloudBotRefresh - http://cloudbot.pw
[23:19:55][INFO] [freenode:*] -kornbluth.freenode.net- *** Looking up your hostname...
[23:19:55][INFO] [freenode:*] -kornbluth.freenode.net- *** Checking Ident
[23:19:55][INFO] [freenode:*] -kornbluth.freenode.net- *** Found your hostname
^C[23:20:05][INFO] Stopping bot.
[23:20:05][INFO] [freenode] >> QUIT :Killed
[23:20:05][INFO] ONJOIN hook triggered.

I just ran a pip install -r requirements.txt --upgrade

No fix there.

tvdb.py times out, no response in channel from bot. Prior to refresh, plugin worked as expected.

[00:27:08] [ERROR] Error in hook tvdb:tv_next
Traceback (most recent call last):
  File "D:\CloudBotRefresh-python3.4\cloudbot\plugin.py", line 365, in _execute_hook
    out = yield from self.bot.loop.run_in_executor(None, self._execute_hook_threaded, hook, event)
  File "C:\Python34\lib\asyncio\futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "C:\Python34\lib\asyncio\tasks.py", line 285, in _wakeup
    value = future.result()
  File "C:\Python34\lib\asyncio\futures.py", line 277, in result
    raise self._exception
  File "C:\Python34\lib\concurrent\futures\thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "D:\CloudBotRefresh-python3.4\cloudbot\plugin.py", line 329, in _execute_hook_threaded
    return hook.function(*parameters)
  File "D:\CloudBotRefresh-python3.4\plugins\tvdb.py", line 73, in tv_next
    episodes = get_episodes_for_series(text, api_key)
  File "D:\CloudBotRefresh-python3.4\plugins\tvdb.py", line 27, in get_episodes_for_series
    series = http.get_xml(base_url + '%s/series/%s/all/en.xml' % (api_key, series_id))
  File "D:\CloudBotRefresh-python3.4\cloudbot\util\http.py", line 55, in get_xml
    return etree.fromstring(get(*args, **kwargs))
  File "D:\CloudBotRefresh-python3.4\cloudbot\util\http.py", line 38, in get
    return open(*args, **kwargs).read()
  File "D:\CloudBotRefresh-python3.4\cloudbot\util\http.py", line 96, in open
    return opener.open(request)
  File "C:\Python34\lib\urllib\request.py", line 455, in open
    response = self._open(req, data)
  File "C:\Python34\lib\urllib\request.py", line 473, in _open
    '_open', req)
  File "C:\Python34\lib\urllib\request.py", line 433, in _call_chain
    result = func(*args)
  File "C:\Python34\lib\urllib\request.py", line 1202, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "C:\Python34\lib\urllib\request.py", line 1177, in do_open
    r = h.getresponse()
  File "C:\Python34\lib\http\client.py", line 1172, in getresponse
    response.begin()
  File "C:\Python34\lib\http\client.py", line 351, in begin
    version, status, reason = self._read_status()
  File "C:\Python34\lib\http\client.py", line 313, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "C:\Python34\lib\socket.py", line 371, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

Multiple functions allowed with the same name

from cloudbot import hook

@hook.command("smr", "stopmodreposts")
def smr(message, chan):
    if chan == "#stopmodreposts":
            return None
    message("What is StopModReposts?")
    message("A movement against mods being re-hosted (and monetized) without the author's permission.")
    message("The website is http://stopmodreposts.org/")
    message("Join #StopModReposts to discuss and get involved")
    return


@hook.command("smrsite", "stopmodrepostsite")
def smr(message, chan):
    if chan == "#stopmodreposts":
            message("The website is http://stopmodreposts.org/")
    return None

^loaded but after 5 mins stopped working

Proposal: Create a proper stable (versioned) release for CloudBot

I've had some complaints that it's very hard to keep up-to-date with Cloudbot and use new versions because of the constant changes, massive amount of vague commits, and the fact that there is often broken code on the main branch.

And I agree completely.

So I'd like to get some ideas and fix that. My initial proposal is to create a new branch, master, and set it as the main branch on the repository. We will do periodic releases from the current python3.4 branch when code is stable and tested. We will assign these releases version numbers. We will provide a changelog of all changes whenever a release is pushed to the stable master branch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.