1
0
Fork 0

Remove dead or useless code

This commit is contained in:
nemunaire 2015-10-30 21:10:06 +01:00
parent 9935e038fc
commit ac33ceb579
41 changed files with 15 additions and 80 deletions

View File

@ -1,5 +1,4 @@
#!/usr/bin/env python3.3
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier

View File

@ -3,7 +3,6 @@
# PYTHON STUFFS #######################################################
import re
import sys
from datetime import datetime, timezone
import shlex
@ -147,7 +146,7 @@ def replace_variables(cnts, msg=None):
resultCnt.append(cnt)
for u in sorted(set(unsetCnt), reverse=True):
k = msg.args.pop(u)
msg.args.pop(u)
return resultCnt

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -128,7 +128,7 @@ def search(msg):
res.append_message(s.redirect)
res.append_message(s.answer)
res.append_message(s.abstract)
res.append_message([res for res in s.result])
res.append_message([r for r in s.result])
for rt in s.relatedTopics:
res.append_message(rt)

View File

@ -94,7 +94,7 @@ def cmd_github(msg):
@hook("cmd_hook", "github_user")
def cmd_github(msg):
def cmd_github_user(msg):
if not len(msg.args):
raise IRCException("indicate a user name to search")
@ -127,7 +127,7 @@ def cmd_github(msg):
@hook("cmd_hook", "github_issue")
def cmd_github(msg):
def cmd_github_issue(msg):
if not len(msg.args):
raise IRCException("indicate a repository to view its issues")
@ -165,7 +165,7 @@ def cmd_github(msg):
@hook("cmd_hook", "github_commit")
def cmd_github(msg):
def cmd_github_commit(msg):
if not len(msg.args):
raise IRCException("indicate a repository to view its commits")

View File

@ -1,5 +1,3 @@
from bs4 import BeautifulSoup
from nemubot.hooks import hook
from nemubot.exception import IRCException
from nemubot.tools import web

View File

@ -2,7 +2,6 @@
"""Use MediaWiki API to get pages"""
import json
import re
import urllib.parse

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#
@ -18,17 +16,18 @@
"""Progressive display of very long messages"""
# PYTHON STUFFS #######################################################
import logging
import sys
from nemubot.message import Text, DirectAsk
from nemubot.hooks import hook
nemubotversion = 3.4
logger = logging.getLogger("nemubot.response")
# MODULE CORE #########################################################
class Response:
def __init__(self, message=None, channel=None, nick=None, server=None,
@ -237,6 +236,8 @@ class Response:
SERVERS = dict()
# MODULE INTERFACE ####################################################
@hook("all_post")
def parseresponse(res):
# TODO: handle inter-bot communication NOMORE

View File

@ -7,7 +7,6 @@ from urllib.parse import urlparse
from nemubot.event import ModuleEvent
from nemubot.exception import IRCException
from nemubot.hooks import hook
from nemubot.tools.web import getNormalizedURL
from nemubot.tools.xmlparser.node import ModuleState

View File

@ -87,7 +87,6 @@ def cmd_whois(msg):
js = getJSON(URL_WHOIS % urllib.parse.quote(dom))
if "ErrorMessage" in js:
err = js["ErrorMessage"]
raise IRCException(js["ErrorMessage"]["msg"])
whois = js["WhoisRecord"]

View File

@ -26,7 +26,7 @@ def cmd_choice(msg):
@hook("cmd_hook", "choicecmd")
def cmd_choice(msg):
def cmd_choicecmd(msg):
if not len(msg.args):
raise IRCException("indicate some command to pick!")

View File

@ -2,7 +2,6 @@
"""Find information about an SAP transaction codes"""
import re
import urllib.parse
import urllib.request
from bs4 import BeautifulSoup
@ -10,7 +9,6 @@ from bs4 import BeautifulSoup
from nemubot.exception import IRCException
from nemubot.hooks import hook
from nemubot.tools import web
from nemubot.tools.web import striphtml
nemubotversion = 4.0

View File

@ -4,7 +4,6 @@
import datetime
import re
from urllib.parse import quote
from nemubot import context
from nemubot.exception import IRCException

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#
@ -16,7 +14,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from datetime import datetime, timedelta, timezone
from datetime import datetime, timezone
import logging
import threading
import sys

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -14,7 +14,6 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from nemubot.hooks.abstract import Abstract
from nemubot.hooks.message import Message
last_registered = []
@ -29,12 +28,12 @@ def hook(store, *args, **kargs):
def reload():
global Abstract, Message
global Message
import imp
import nemubot.hooks.abstract
imp.reload(nemubot.hooks.abstract)
Abstract = nemubot.hooks.abstract.Abstract
import nemubot.hooks.message
imp.reload(nemubot.hooks.message)
Message = nemubot.hooks.message.Message

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# coding=utf-8
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#

View File

@ -1,5 +1,4 @@
#!/usr/bin/python3
# coding=utf-8
import datetime
import time

View File

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
# Nemubot is a smart and modulable IM bot.
# Copyright (C) 2012-2015 Mercier Pierre-Olivier
#