Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • msemper/guppy
1 result
Show changes
Commits on Source (23)
== Style guidelines ==
* Don't mix tabs and spaces in one file. It is current# Copyright (C)
2010-2016 Svetlana A. Tkachenko <svetlana@members.fsf.org>
#
# This file is part of guppy.
#
# guppy 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.
#
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.ly recommended to use 4 spaces for indentation (discussion is welcome as long as we agree to convert existing files to a new style).
== TODO ==
Deadline: December 10, 2012
[ ] Core fixes
[ ] set guppy to reconnect after ping timeouts (currently this works unreliably)
[ ] when an exception happens during a xxx plugin load, don't say 'no plugin xxx found' for a next load attempt
[ ] handle ssl warnings
[ ] fix that guppy freezes after a while of idling in a channel
[ ] ircv3 support
[ ] optional core fixes
[ ] split sent lines if too long
[ ] warn when loading a module if it has no docstring
[ ] plugins
[ ] create chansever plugin to update autojoin when guppy joins or parts channels
[ ] add plugin tags functionality ( ie networking plugins, wikimedia plugins, ...; to group plugins other than alphabetical list )
https://twistedmatrix.com/trac/browser/trunk/twisted
http://docs.python.org/3/library/unittest.html
https://python-guide.readthedocs.org/en/latest/writing/tests.html
# Copyright (C) 2010-2016 Svetlana A. Tkachenko <svetlana@members.fsf.org>
#
# This file is part of guppy.
#
# guppy 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.
#
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
1) Download
Use your operating system installer to download Guppy on these systems:
* Archlinux
* Windows (coming soon)
Alternatively, use wget to download guppy over http, or git.
* (git instructions coming soon)
2) Directory structure
After downloading guppy, the directory structure will be similar to something like this:
conf/
......@@ -10,11 +40,11 @@ After downloading guppy, the directory structure will be similar to something li
The extra/ directory contains plugins that are either unfinished or very specific, you will usually not need them. (You can put them in plugins/ before running the install script, if you need them, but do please read them first if you decide to do so.)
The dist/ directory contains installation scripts for certain operating systems, this may be useful if you are using them. Currently available install scripts are for:
The dist/ directory contains installation scripts for supported operating systems.
Archlinux
3) Configuration
If this is not your distro, run the guppy executably once to launch the installer script.
Run the guppy executably once to launch the installer script.
$ ./guppy
......@@ -22,12 +52,13 @@ It will prompt you with a list of plugins. Choose carefully, the default is mini
$ ./guppy
__ _ _ _ _ __ _ __ _ _
__ _ _ _ _ __ _ __ _ _
/ _` | | | | '_ \| '_ \| | | | http://repo.or.cz/w/guppy.git/summary
| (_| | |_| | |_) | |_) | |_| | irc://irc.freenode.net/guppy
\__, |\__,_| .__/| .__/ \__, | http://guppy.gshellz.org
|___/ |_| |_| |___/ version 0.4.3
\__, |\__,_| .__/| .__/ \__, | http://guppy.uk.to
|___/ |_| |_| |___/ version 0.4.4
Settings directory: /home/test/tests/ircd/guppy/conf/
No configuration file found, running makeconf
What IRC network do I connect to (just the name)? []: gnu
......@@ -36,6 +67,8 @@ It will prompt you with a list of plugins. Choose carefully, the default is mini
What nickname should I use? []:
...
4) Running in background
After the configuration, the binary will exit, and you will need to start it again in screen or tmux with no arguments; guppy does not fork into the background.
$ screen -U ./guppy
......@@ -45,6 +78,8 @@ or
$ tmux ./guppy
5) Authentication
Once the bot joins the channel, if you loaded auth plugin, you will need to set up your password. Otherwise anyone who uses your nickname can control the bot. Use the "passwd" command in PM with the bot to set a new password.
<rob> passwd lam3r lam3r
......
Source: http://repo.or.cz/w/guppy.git
License: GPLv3.
# Copyright (C) 2010-2016 Svetlana A. Tkachenko <svetlana@members.fsf.org>
#
# This file is part of guppy.
#
# guppy 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.
#
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
Website: http://guppy.uk.to
Channel: irc://irc.freenode.net/guppy
Feedback means are #guppy at freenode, and the feedback form on the website.
Feedback means are #guppy at freenode.
For more information about the freenode IRC network, supporting free
and open-source communities since 1998, please visit www.freenode.net.
For installation instructions, please see the INSTALL file.
# Copyright (C) 2010-2016 Svetlana A. Tkachenko <svetlana@members.fsf.org>
#
# This file is part of guppy.
#
# guppy 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.
#
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
== Style guidelines ==
* Don't mix tabs and spaces in one file. It is currently recommended to use 4 spaces for indentation (discussion is welcome as long as we agree to convert existing files to a new style).
......
# Copyright (C) 2010-2016 Svetlana A. Tkachenko
#
# This file is part of guppy.
#
# guppy 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.
#
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
For debugging, to make a unix OS user lose internet connection, run
# iptables -A OUTPUT -o eth0 -m owner --uid-owner 1002 -j DROP
......
#
# Copyright (C) 2010-2016 Svetlana A. Tkachenko
#
# This file is part of guppy.
#
# guppy 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.
#
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
This page is a git cheatsheet. git is recommended for contributing to guppy, but is not required.
(As always, manpages are the grand superior resource.)
......
#
# Copyright (C) 2010-2016 Svetlana A. Tkachenko
#
# This file is part of guppy.
#
# guppy 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.
#
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
what guppy does when it has a ns username and password set is:
'/msg nickserv identify accountname pwd' onconnect
some networks want '/msg nickserv identify pwd'
......
# Copyright (C) 2010-2016 Svetlana A. Tkachenko
#
# This file is part of guppy.
#
# guppy 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.
#
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
Wishlist
Attention - this wishlist is outdated and the homepage is being updated to include a bug tracker!
== Core ==
* Implement [[http://ircv3.atheme.org/|IRC "v3"]] compatibility.
* Implement [[http://ircv3.atheme.org/|IRC "v3"]] compatibility (where reasonable).
* <del>Implement ''self.server.mynick'' to reflect nick changes, after which bot nick is not the conf nick.</del> Unneeded?
* Adding tags/categories for available commands could increase usability.
* Read [[http://tools.ietf.org/html/rfc1459|RFC1459]] and add any issues to 'current'.
......
# guppy Copyright (C) 2010-2011 guppy team members.
# Copyright (C) 2010-2016 Svetlana A. Tkachenko <svetlana@members.fsf.org>
# Copyright (C) 2011 David Vo <david.vo2@gmail.com>
#
# This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
# This is free software, and you are welcome to redistribute it
# under certain conditions; type `show c' for details.
# This program 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 2 of the License, or
# (at your option) any later version.
# This file is part of guppy.
#
# This program 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.
# guppy 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.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
# We need the decorator, otherwise the
......
# guppy Copyright (C) 2010-2011 guppy team members.
# Copyright (C) 2010-2016 Svetlana A. Tkachenko <svetlana@members.fsf.org>
#
# This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
# This is free software, and you are welcome to redistribute it
# under certain conditions; type `show c' for details.
# This program 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 2 of the License, or
# (at your option) any later version.
# This file is part of guppy.
#
# This program 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.
# guppy 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.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
import time, threading
import json
......
#!/usr/bin/env python3
# guppy Copyright (C) 2010-2011 guppy team members.
#
# This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
# This is free software, and you are welcome to redistribute it
# under certain conditions; type `show c' for details.
# This program 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 2 of the License, or
# (at your option) any later version.
# Copyright (C) 2010-2016 Svetlana A. Tkachenko
# Copyright (C) 2010-2016 David Vo
# Copyright (C) 2010-2016 aLasterShark
#
# This program 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.
# This file is part of guppy.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
# guppy 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.
#
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
import sys
......@@ -41,7 +41,7 @@ class main(object):
print(" __ _ _ _ _ __ _ __ _ _ ")
print(" / _` | | | | '_ \| '_ \| | | | http://repo.or.cz/w/guppy.git/summary")
print("| (_| | |_| | |_) | |_) | |_| | irc://irc.freenode.net/guppy")
print(" \__, |\__,_| .__/| .__/ \__, | ")
print(" \__, |\__,_| .__/| .__/ \__, | http://guppy.uk.to")
print(" |___/ |_| |_| |___/ version " + self.version)
print("PID: " + str(os.getpid()))
self.directory = self.homedir + '/conf/'
......@@ -141,6 +141,7 @@ optional arguments:
self.set(currentNetwork, 'use_ssl', 'Should I use ssl (yes/no)?', 'no')
self.set(currentNetwork, 'ipv6', 'Should I use IPv6 to connect (yes/no)?', 'no')
self.set(currentNetwork, "comchar", "What command char (other than my nick) should I respond to?", "-")
self.set(currentNetwork, "infochar", "What command char should I use for the info plugin?", "~") ###N# Asks for and writes the infochar to the main.cfg
list1 = os.listdir(self.homedir + "/plugins")
list2 = [item.replace(".py", "") for item in list1 if not '__' in item]
print("Available plugins are: " + " ".join(list2))
......@@ -176,3 +177,4 @@ if __name__ == "__main__":
print("Shutting down all connections...")
c.stop()
print("Quitting!")
# guppy Copyright (C) 2010-2011 guppy team members.
#
# This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
# This is free software, and you are welcome to redistribute it
# under certain conditions; type `show c' for details.
# This program 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 2 of the License, or
# (at your option) any later version.
# Copyright (C) 2010-2016 Svetlana A. Tkachenko
# Copyright (C) 2010-2016 David Vo
# Copyright (C) 2010-2016 FurryHead
#
# This program 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.
# This file is part of guppy.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
# guppy 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.
#
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
#import os, threading
import socket, re, asynchat, traceback, ssl
import plugins
import time
import os
class User(str):
......@@ -388,7 +388,12 @@ class IRC(asynchat.async_chat):
def doQuit(self, message=""):
self.sendLine("QUIT :" + message)
self.pluginManager.event("quit", User(self.config["nickname"]), message)
self.close_when_done()
# self.prnt("Closing when done...")
# self.close_when_done()
# self.prnt("sys.exiting...")
# sys.exit("By user request.")
os._exit(2)
self.prnt("Exited.")
def doNotice(self, user, message):
self.sendLine("NOTICE " + user + " :" + message)
......
# guppy Copyright (C) 2010-2011 guppy team members.
# Copyright (C) 2010-2016 Svetlana A. Tkachenko <svetlana@members.fsf.org>
# Copyright (C) 2010-2016 David Vo <david.vo2@gmail.com>
# Copyright (C) 2010-2016 FurryHead <furryhead14@yahoo.com>
#
# This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
# This is free software, and you are welcome to redistribute it
# under certain conditions; type `show c' for details.
# This program 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 2 of the License, or
# (at your option) any later version.
#
# This program 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.
# This file is part of guppy.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
# guppy 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.
#
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
@plugin
......@@ -25,7 +24,7 @@ class AdminTools(object):
def __init__(self, server):
self.server = server
self.server.pluginManager.loadPlugin("auth")
self.commands = ["nick", "join", "part", "kick", "ban", "mute", "unban", "unmute", "op", "deop", "voice", "devoice", "unop", "unvoice", "attrs"]
self.commands = ["nick", "join", "part", "kick", "ban", "mute", "unban", "unmute", "op", "deop", "voice", "devoice", "unop", "unvoice", "attrs", "die"]
self.server.handle("command", self.handle_command, self.commands)
def handle_command(self, channel, user, cmd, args):
......
# guppy Copyright (C) 2010-2011 guppy team members.
# Copyright (C) 2010-2016 Svetlana A. Tkachenko <svetlana@members.fsf.org>
# Copyright (C) 2010-2016 David Vo <david.vo2@gmail.com>
# Copyright (C) 2010-2016 FurryHead <furryhead14@yahoo.com>
# Copyright (C) 2011 Kenneth K. Sham <ken@ksham.net>
#
# This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
# This is free software, and you are welcome to redistribute it
# under certain conditions; type `show c' for details.
# This program 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 2 of the License, or
# (at your option) any later version.
# This file is part of guppy.
#
# This program 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.
# guppy 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.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
import os, configparser
......
# guppy Copyright (C) 2010-2011 guppy team members.
#
# This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
# This is free software, and you are welcome to redistribute it
# under certain conditions; type `show c' for details.
# This program 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 2 of the License, or
# (at your option) any later version.
# Copyright (C) 2010-2016 Svetlana A. Tkachenko <svetlana@members.fsf.org>
# Copyright (C) 2010-2016 David Vo <david.vo2@gmail.com>
# Copyright (C) 2010-2016 FurryHead <furryhead14@yahoo.com>
# Copyright (C) 2011 Kenneth K. Sham <ken@ksham.net>
#
# This program 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.
# This file is part of guppy.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
# guppy 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.
#
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
import re
import time
......
# guppy Copyright (C) 2010-2011 guppy team members.
# Copyright (C) 2010-2016 Svetlana A. Tkachenko <svetlana@members.fsf.org>
# Copyright (C) 2010-2016 David Vo <david.vo2@gmail.com>
# Copyright (C) 2010-2016 Ola Nystrom <olanys@gmail.com>
#
# This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
# This is free software, and you are welcome to redistribute it
# under certain conditions; type `show c' for details.
# This program 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 2 of the License, or
# (at your option) any later version.
# This file is part of guppy.
#
# This program 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.
# guppy 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.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
# ctcp module
# --gry
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
import time
......@@ -46,6 +41,8 @@ class ctcp(object):
self.prnt("CTCP args: " + ctcp_args + " came in")
if ctcp_type == "version":
self.server.doNotice(nick, "\001VERSION guppy " + self.server.config["version"] + "\001")
elif ctcp_type == "clientinfo":
self.server.doNotice(nick, "\001VERSION guppy " + self.server.config["version"] + "\001")
elif ctcp_type == "source":
self.server.doNotice(nick, "\001VERSION http://repo.or.cz/w/guppy.git\001")
elif ctcp_type == "ping":
......
# guppy Copyright (C) 2010-2011 guppy team members.
# Copyright (C) 2010-2016 Svetlana A. Tkachenko <svetlana@members.fsf.org>
# Copyright (C) 2010-2016 David Vo <david.vo2@gmail.com>
#
# This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
# This is free software, and you are welcome to redistribute it
# under certain conditions; type `show c' for details.
# This program 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 2 of the License, or
# (at your option) any later version.
# This file is part of guppy.
#
# This program 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.
# guppy 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.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
# ddg module
# --gry
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
import urllib.request
#from urllib.error import HTTPError, URLError
......@@ -53,5 +48,7 @@ class ddg(object):
elif str(jl["Definition"]) != "":
url = urllib.parse.unquote(str(jl["DefinitionURL"]))
self.server.doMessage(channel, user + ": " + "%s %s" % (url, str(jl["Definition"])))
else:
self.server.doMessage(channel, "No results for " + request + '.')
except Exception as e:
self.server.doMessage(channel, user + ": " + str(e))
# guppy Copyright (C) 2010-2011 guppy team members.
# Copyright (C) 2010-2016 Svetlana A. Tkachenko <svetlana@members.fsf.org>
# Copyright (C) 2010-2016 David Vo <david.vo2@gmail.com>
#
# This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
# This is free software, and you are welcome to redistribute it
# under certain conditions; type `show c' for details.
# This program 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 2 of the License, or
# (at your option) any later version.
# This file is part of guppy.
#
# This program 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.
# guppy 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.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
# dns module
# --gry
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
import urllib.request, urllib.parse, urllib.error
import socket
......
# guppy Copyright (C) 2010-2011 guppy team members.
# Copyright (C) 2010-2016 Svetlana A. Tkachenko <svetlana@members.fsf.org>
# Copyright (C) 2010-2016 David Vo <david.vo2@gmail.com>
# Copyright (C) 2010-2016 Furryhead <furryhead14@yahoo.com>
#
# This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
# This is free software, and you are welcome to redistribute it
# under certain conditions; type `show c' for details.
# This program 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 2 of the License, or
# (at your option) any later version.
# This file is part of guppy.
#
# This program 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.
# guppy 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.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
# guppy 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 guppy. If not, see <http://www.gnu.org/licenses/>.
import sys
......