Skip to content

Commit

Permalink
OFTC, http -> https, url fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
TinoDidriksen committed May 27, 2021
1 parent c8a5a9f commit ee6e8bf
Show file tree
Hide file tree
Showing 18 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ notifications:
# The irc channel is encrypted for apertium/phenny, so build notifications from forks won't show up on the IRC channel
# Encrypt with:
# $ gem install --user-install travis
# $ ~/.gem/ruby/*/bin/travis encrypt -r apertium/phenny 'chat.freenode.net#apertium'
# $ ~/.gem/ruby/*/bin/travis encrypt -r apertium/phenny 'irc.oftc.net#apertium'
2 changes: 1 addition & 1 deletion irc.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def f_ping(self, origin, match, args):

def main():
bot = TestBot('testbot007', 'testbot007', ['#wadsworth'])
bot.run('irc.freenode.net')
bot.run('irc.oftc.net')
print(__doc__)

if __name__=="__main__":
Expand Down
6 changes: 3 additions & 3 deletions modules/apertium_wiki.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import web

endpoints = {
'api': 'http://wiki.apertium.org/api.php?action=query&list=search&srlimit=1&format=json&srsearch={0}',
'url': 'http://wiki.apertium.org/wiki/{0}',
'logs': 'https://tinodidriksen.com/pisg/freenode/logs/',
'api': 'https://wiki.apertium.org/api.php?action=query&list=search&srlimit=1&format=json&srsearch={0}',
'url': 'https://wiki.apertium.org/wiki/{0}',
'logs': 'https://tinodidriksen.com/pisg/OFTC/logs/',
}


Expand Down
4 changes: 2 additions & 2 deletions modules/apertium_wikistats.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def awikstats(phenny, input):
return

try:
urllib.request.urlopen('http://wiki.apertium.org/wiki/Apertium-' + lang)
urllib.request.urlopen('https://wiki.apertium.org/wiki/Apertium-' + lang)
except urllib.error.HTTPError:
phenny.say('%s: No wiki for specified language!' % input.nick)
return
Expand All @@ -77,7 +77,7 @@ def awikstats(phenny, input):
try:
out = stdout.splitlines()[-1].decode('utf-8').strip()
if out.startswith('Coverage:'):
phenny.msg(input.nick, '%s - http://wiki.apertium.org/wiki/Apertium-%s/stats' % (out, lang))
phenny.msg(input.nick, '%s - https://wiki.apertium.org/wiki/Apertium-%s/stats' % (out, lang))
else:
for line in stderr.splitlines():
phenny.msg(input.nick, line)
Expand Down
14 changes: 7 additions & 7 deletions modules/fs_quotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@

topics = {"particles": "\"particle\" stands for \"defeat\" -spectie",
"installing apertium": "try \"installing apertium on <operating system>\"",
"installing apertium on ubuntu": "http://wiki.apertium.org/wiki/Apertium_on_Ubuntu",
"installing apertium on linux": "http://wiki.apertium.org/wiki/Apertium_on_Ubuntu",
"installing apertium on windows": "http://wiki.apertium.org/wiki/Apertium_on_Windows",
"google summer of code": "http://wiki.apertium.org/wiki/Google_Summer_of_Code",
"gsoc": "http://wiki.apertium.org/wiki/Google_Summer_of_Code",
"spectie": "http://wiki.apertium.org/wiki/User:Francis_Tyers",
"firespeaker": "http://wiki.apertium.org/wiki/User:Firespeaker",
"installing apertium on ubuntu": "https://wiki.apertium.org/wiki/Apertium_on_Ubuntu",
"installing apertium on linux": "https://wiki.apertium.org/wiki/Apertium_on_Ubuntu",
"installing apertium on windows": "https://wiki.apertium.org/wiki/Apertium_on_Windows",
"google summer of code": "https://wiki.apertium.org/wiki/Google_Summer_of_Code",
"gsoc": "https://wiki.apertium.org/wiki/Google_Summer_of_Code",
"spectie": "https://wiki.apertium.org/wiki/User:Francis_Tyers",
"firespeaker": "https://wiki.apertium.org/wiki/User:Firespeaker",
"zfe": "http://quotes.firespeaker.org/?who=zfe"
}

Expand Down
2 changes: 1 addition & 1 deletion modules/greeting.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def greeting(phenny, input):
opted_out_of_m.append(row[0])

if "[m]" in input.nick and not input.nick in opted_out_of_m:
hint = "Please consider removing [m] from your IRC nick. See http://wiki.apertium.org/wiki/IRC/Matrix#Remove_.5Bm.5D_from_your_IRC_nick for details. Reply .dismiss to prevent this message from appearing again."
hint = "Please consider removing [m] from your IRC nick. See https://wiki.apertium.org/wiki/IRC/Matrix#Remove_.5Bm.5D_from_your_IRC_nick for details. Reply .dismiss to prevent this message from appearing again."
phenny.msg(input.nick, input.nick + ": " + hint)

if input.sender.casefold() not in phenny.config.greetings.keys():
Expand Down
4 changes: 2 additions & 2 deletions modules/head.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ def gettitle(phenny, input, uri):
uri = 'http://' + uri
uri = uri.replace('#!', '?_escaped_fragment_=')

if uri.startswith('http://wiki.apertium.org/wiki/'):
item = uri[len('http://wiki.apertium.org/wiki/'):]
if uri.startswith('https://wiki.apertium.org/wiki/'):
item = uri[len('https://wiki.apertium.org/wiki/'):]
return apertium_wiki.awik(phenny, re.match(r'(blahblah)?(.*)()', item))
if re.match(r'https?://en.wiktionary.org/wiki/(.*)', uri):
item = re.match(r'https?://en.wiktionary.org/wiki/(.*)', uri).group(1)
Expand Down
2 changes: 1 addition & 1 deletion modules/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def help(phenny, input):
try:
helpurl = phenny.config.helpurl
except AttributeError:
helpurl = "http://wiki.apertium.org/wiki/Begiak"
helpurl = "https://wiki.apertium.org/wiki/Begiak"

commands = [func for priority, commands in phenny.commands.items()
for regex, funcs in commands.items() for func in funcs]
Expand Down
2 changes: 1 addition & 1 deletion modules/ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
emptyHellos = False


#temporaryMessage = " If you're a GSoC student, check out http://wiki.apertium.org/wiki/Top_tips_for_GSOC_applications"
#temporaryMessage = " If you're a GSoC student, check out https://wiki.apertium.org/wiki/Top_tips_for_GSOC_applications"
temporaryMessage = None

greetings = ('Hi', 'Hey', 'Hello', 'What\'s kicking', 'What\'s the good word', 'Top of the morning', 'Yo', 'What up', 'Sup', "What's hanging", "In the hood", "Kaixo", "Zer moduz", "Сәлем", "Қалың қалай", "Salom", "Привет", "No bugs is good bugs", "Mitä kuuluu", "حالت چطوره", "როგორა ხარ", "ինչպե՞ս ես", "сайн байна уу", "कैसे हो", "Como vai", "Nasılsın", "Ворчӏами", "Howdy", "你好", "여보세요", "こんにちは", "Bonjour", "Hola", "Goddag", "Goedendag", "नमस्ते", "Olá", "Здравствуйте", "नमस्कार", "Góðan dag", "Sveiki", "Hallo", "Salam", "Cześć", "Bună ziua", "Zdravo", "Ahoj", "Բարև", "Ողջույն", "Բարև Ձեզ", "Ինչպե՞ս եք", "Ինչպե՞ս են Ձեր գործերը", "Sveiki", "Zdravo", "Γειά σου", "გამარჯობა", "Вітання", "سلام", "Saluton", "Здравейте", "Сәлеметсіз бе", "Hola", "Як ти", "Здраво", "Πώς είσαι", "Как ты", "Здравствуй")
Expand Down
2 changes: 1 addition & 1 deletion modules/salespitches.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def begiak(phenny, input):
""".about, .info, .begiak - my autobiography"""
phenny.say("Hi! I'm Begiak, Apertium's IRC bot.")
phenny.say("I like to sit around on #apertium and be helpful by letting everyone know about Git commits (and a few other things), and by responding to commands.")
phenny.say("Check out http://wiki.apertium.org/wiki/Begiak for more info.")
phenny.say("Check out https://wiki.apertium.org/wiki/Begiak for more info.")
begiak.commands = ['begiak', 'about', 'info']
begiak.priority = 'high'
begiak.example = '.begiak'
2 changes: 1 addition & 1 deletion modules/test/test_alias.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def setUp(self):
self.input = MagicMock()
self.input2 = MagicMock()
self.phenny.nick = 'phenny'
self.phenny.config.host = 'irc.freenode.net'
self.phenny.config.host = 'irc.oftc.net'

def create_alias(self, aliasName, input):
self.input.group = lambda x: ['', 'add', aliasName][x]
Expand Down
2 changes: 1 addition & 1 deletion modules/test/test_apertium_wiki.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def prepare(self):
url_text = wiki.format_term(self.term)

self.input.group = lambda x: [None, None, self.text, None][x]
self.url = 'http://wiki.apertium.org/wiki/%s' % url_text
self.url = 'https://wiki.apertium.org/wiki/%s' % url_text

def check_snippet(self, output):
self.assertIn(self.url, output)
Expand Down
2 changes: 1 addition & 1 deletion modules/test/test_clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TestClock(unittest.TestCase):
def setUp(self):
self.phenny = MagicMock()
self.phenny.nick = 'phenny'
self.phenny.config.host = 'irc.freenode.net'
self.phenny.config.host = 'irc.oftc.net'

self.input = MagicMock()
self.input.nick = 'Testsworth'
Expand Down
4 changes: 2 additions & 2 deletions modules/test/test_greeting.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def setUp(self):
self.phenny = MagicMock()
self.input = MagicMock()
self.phenny.nick = 'phenny'
self.phenny.config.host = 'irc.freenode.net'
self.phenny.config.host = 'irc.oftc.net'

logger.setup(self.phenny)
greeting.setup(self.phenny)
Expand Down Expand Up @@ -51,5 +51,5 @@ def test_greeting_remove_m_hint(self):

greeting.greeting(self.phenny, self.input)

hint = "Please consider removing [m] from your IRC nick. See http://wiki.apertium.org/wiki/IRC/Matrix#Remove_.5Bm.5D_from_your_IRC_nick for details. Reply .dismiss to prevent this message from appearing again."
hint = "Please consider removing [m] from your IRC nick. See https://wiki.apertium.org/wiki/IRC/Matrix#Remove_.5Bm.5D_from_your_IRC_nick for details. Reply .dismiss to prevent this message from appearing again."
self.phenny.msg.assert_called_once_with(self.input.nick, self.input.nick + ": " + hint)
2 changes: 1 addition & 1 deletion modules/test/test_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class TestHead(unittest.TestCase):

def setUp(self):
self.phenny = MagicMock(nick='phenny')
self.phenny.config.host = 'irc.freenode.net'
self.phenny.config.host = 'irc.oftc.net'

head.setup(self.phenny)
self.input = MagicMock(sender='#phenny', nick='tester')
Expand Down
2 changes: 1 addition & 1 deletion modules/test/test_more.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def setUp(self):
self.phenny = MagicMock()
self.phenny.nick = 'phenny'
self.phenny.config.channels = ['#example', '#test']
self.phenny.config.host = 'irc.freenode.net'
self.phenny.config.host = 'irc.oftc.net'

self.input = MagicMock()
self.input.sender = '#test'
Expand Down
2 changes: 1 addition & 1 deletion modules/test/test_tell.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TestTell(unittest.TestCase):
def setUp(self):
self.phenny = MagicMock()
self.phenny.nick = 'phenny'
self.phenny.config.host = 'irc.freenode.net'
self.phenny.config.host = 'irc.oftc.net'

self.input = MagicMock()
tell.setup(self.phenny)
Expand Down
2 changes: 1 addition & 1 deletion modules/whois.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def whois(phenny, input):
say_username('GCI/GSOC', user.wiki, None, phenny)

if user.wiki is not None:
say_username('Apertium Wiki', user.wiki, 'http://wiki.apertium.org/wiki/User:{}', phenny)
say_username('Apertium Wiki', user.wiki, 'https://wiki.apertium.org/wiki/User:{}', phenny)

if user.github is not None:
say_username('GitHub', user.github, 'https://github.com/{}', phenny)
Expand Down

0 comments on commit ee6e8bf

Please sign in to comment.