mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +01:00
19 lines
339 B
Python
19 lines
339 B
Python
|
#!/usr/bin/env python
|
||
|
|
||
|
import sys
|
||
|
|
||
|
import ircmsgs
|
||
|
import ircutils
|
||
|
|
||
|
sys.path.append('..')
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
total = 0
|
||
|
lines = 0
|
||
|
for line in sys.stdin:
|
||
|
msg = ircmsgs.IrcMsg(line)
|
||
|
if ircutils.isUserHostmask(msg.prefix):
|
||
|
total += len(msg.prefix)
|
||
|
lines += 1
|
||
|
print total / lines
|