eranroz created this task.
Herald added subscribers: pywikibot-bugs-list, Zppix, Aklapper.
TASK DESCRIPTION
Pywikibot IRCBot uses the following regex to parse IRC messages:
self.re_edit = re.compile(
r'^C14\[\[^C07(?P<page>.+?)^C14\]\]^C4 (?P<flags>.*?)^C10 ^C02'
r'(?P<url>.+?)^C ^C5\*^C ^C03(?P<user>.+?)^C ^C5\*^C \(?^B?'
r'(?P<bytes>[+-]?\d+?)^B?\) ^C10(?P<summary>.*)^C'
.replace('^B', '\002').replace('^C', '\003').replace('^U',
'\037'))
I use this to detect bot edits with the following check: 'B' in
match.group('flags') for my bot which flags possible copyright violations in
enwiki, and use this simple check to skip bot edits. However @Doc_James noticed
we sometimes check ClueBot NG which is bot [ 1
<https://en.wikipedia.org/w/index.php?title=User:EranBot/Copyright/rc&diff=721628366&oldid=721628285>
], which means B doesn't appear in the flags parsed in the regex message.
TASK DETAIL
https://phabricator.wikimedia.org/T135965
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: eranroz
Cc: Aklapper, Zppix, eranroz, Doc_James, pywikibot-bugs-list, Mdupont, jayvdb,
Krenair
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs