src/eric7/Network/IRC/IrcUtilities.py

branch
eric7
changeset 10428
a071d4065202
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10427:3733e2b23cf7 10428:a071d4065202
26 26
27 def ircTimestamp(): 27 def ircTimestamp():
28 """ 28 """
29 Module method to generate a time stamp string. 29 Module method to generate a time stamp string.
30 30
31 @return time stamp (string) 31 @return time stamp
32 @rtype str
32 """ 33 """
33 if Preferences.getIrc("ShowTimestamps"): 34 if Preferences.getIrc("ShowTimestamps"):
34 if Preferences.getIrc("TimestampIncludeDate"): 35 if Preferences.getIrc("TimestampIncludeDate"):
35 if QApplication.isLeftToRight(): 36 if QApplication.isLeftToRight():
36 f = "{0} {1}" 37 f = "{0} {1}"
51 52
52 def ircFilter(msg): 53 def ircFilter(msg):
53 """ 54 """
54 Module method to make the message HTML compliant and detect URLs. 55 Module method to make the message HTML compliant and detect URLs.
55 56
56 @param msg message to process (string) 57 @param msg message to process
57 @return processed message (string) 58 @type str
59 @return processed message
60 @rtype str
58 """ 61 """
59 # step 1: cleanup message 62 # step 1: cleanup message
60 msg = Utilities.html_encode(msg) 63 msg = Utilities.html_encode(msg)
61 64
62 # step 2: replace IRC formatting characters 65 # step 2: replace IRC formatting characters
177 180
178 def getChannelModesDict(): 181 def getChannelModesDict():
179 """ 182 """
180 Module function to get the dictionary with the channel modes mappings. 183 Module function to get the dictionary with the channel modes mappings.
181 184
182 @return dictionary with channel modes mapping (dict) 185 @return dictionary with channel modes mapping
186 @rtype dict
183 """ 187 """
184 global __channelModesDict 188 global __channelModesDict
185 189
186 if __channelModesDict is None: 190 if __channelModesDict is None:
187 __initChannelModesDict() 191 __initChannelModesDict()

eric ide

mercurial