Update coding style for my modules
vim:set et sts=4: (No tabs, and indents = 4 chars)
--- a/plugins/aspell_plugin.py Wed May 02 14:01:53 2007 +0200
+++ b/plugins/aspell_plugin.py Wed May 02 19:38:00 2007 +0200
@@ -1,4 +1,5 @@
#$ neutron_plugin 01
+# 2007-05 Mikael Berthe <mikael@lilotux.net>
import popen2
import re
@@ -24,7 +25,7 @@
r = stdout.readline()
for r in stdout.readlines():
- r = r.decode('iso-8859-15')
+ r = r.decode('iso-8859-15')
if r == "*\n":
reply += "* Word correctly spelled.\n"
elif r.startswith("& "):
@@ -40,4 +41,6 @@
smsg(type, source, reply.rstrip())
register_command_handler(handler_aspell, 'aspell', 0, 'Check the spelling',
- 'aspell [lang]', ['aspell fr bonjour'])
+ 'aspell [lang]', ['aspell fr bonjour'])
+
+# vim:set et sts=4:
--- a/plugins/wtf_plugin.py Wed May 02 14:01:53 2007 +0200
+++ b/plugins/wtf_plugin.py Wed May 02 19:38:00 2007 +0200
@@ -1,31 +1,32 @@
#$ neutron_plugin 01
+# 2007-05 Mikael Berthe <mikael@lilotux.net>
import re
WTF_FILE = 'static/wtf.txt'
def handler_wtf(type, source, parameters):
- parameters = parameters.rstrip(" ?\n").lstrip()
- word = parameters.upper() + "\t"
+ parameters = parameters.rstrip(" ?\n").lstrip()
+ word = parameters.upper() + "\t"
- if not parameters:
- if type == 'private':
- smsg(type, source, "Gimme an acronym!")
- return
+ if not parameters:
+ if type == 'private':
+ smsg(type, source, "Gimme an acronym!")
+ return
- reply = ''.join(line for line in file(WTF_FILE) \
- if line.startswith(word))
+ reply = ''.join(line for line in file(WTF_FILE) if line.startswith(word))
- if not reply:
- if type == 'private':
- reply = "Sorry, I don't know what " + parameters + \
- " means..."
- else:
- return
- else:
- reply= re.sub("\t+", ": ", reply.rstrip())
+ if not reply:
+ if type == 'private':
+ reply = "Sorry, I don't know what " + parameters + " means..."
+ else:
+ return
+ else:
+ reply= re.sub("\t+", ": ", reply.rstrip())
- smsg(type, source, reply)
+ smsg(type, source, reply)
register_command_handler(handler_wtf, 'wtf', 0,
'Translates acronyms for you', 'wtf', ['wtf wtf'])
+
+# vim:set et sts=4: