MCPcopy Index your code
hub / github.com/pyload/pyload / _parse_irc_msg

Method _parse_irc_msg

module/plugins/hoster/XDCC.py:62–83  ·  view source on GitHub ↗

Breaks a message from an IRC server into its origin, command, and arguments.

(self, line)

Source from the content-addressed store, hash-verified

60
61
62 def _parse_irc_msg(self, line):
63 """
64 Breaks a message from an IRC server into its origin, command, and arguments.
65 """
66 origin = ''
67 if not line:
68 return None, None, None
69
70 if line[0] == ':':
71 origin, line = line[1:].split(' ', 1)
72
73 if line.find(' :') != -1:
74 line, trailing = line.split(' :', 1)
75 args = line.split()
76 args.append(trailing)
77
78 else:
79 args = line.split()
80
81 command = args.pop(0)
82
83 return origin, command, args
84
85
86 @lock

Callers 1

get_irc_commandMethod · 0.95

Calls 4

splitMethod · 0.80
popMethod · 0.80
findMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected