Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken handling of newusers/create2 events #30

Closed
Krinkle opened this issue Oct 13, 2017 · 0 comments
Closed

Fix broken handling of newusers/create2 events #30

Krinkle opened this issue Oct 13, 2017 · 0 comments
Assignees
Milestone

Comments

@Krinkle
Copy link
Member

Krinkle commented Oct 13, 2017

It seems the pattern for these log message has changed at some point in 2009 and the logs have been full of errors about them since.

# Project.cs

            rCreate2Regex = new Regex( namespaces["2"]+@":(.*): \[\[" );
# RCReader.cs
                                 Match mc2 = ((Project)Program.prjlist[rce.project]).rCreate2Regex.Match(rce.comment);

Example of actual irc.wikimedia.org entries:

# 2016-11-02 on #nl.wikipedia

[[Speciaal:Log/newusers]] create2  * BRPots *  created new account Gebruiker:BRPwiki: eerder fout gemaakt

# 2016-11-02 on #nl.wikipedia
[[Speciaal:Log/newusers]] create2  * Sherani koster *  created new account Gebruiker:Rani farah koster

# 2017-10-13 on #en.wikipedia:
[[Special:Log/newusers]] create2  * Ujju.19788 *  created new account User:Upendhare

The MediaWiki legacy-irc message for this is newuserlog-create2-entry which contains:

created new account $1

This was changed in 2009 (diff), before that it was:

created account for $1

I guess it the user name used to be wrapped in [[ and ]], but is no longer. This makes it slightly more difficult to extract given that the log comment is also optional and appended right after an (optional) colon after the username. But I guess colons are illegal in usernames so changing the pattern as follows should work.

-            rCreate2Regex = new Regex( namespaces["2"]+@":(.*): \[\[" );
+            rCreate2Regex = new Regex( namespaces["2"]+@":([^]:+)" );
@Krinkle Krinkle added this to the 1.22.0 milestone Oct 13, 2017
@Krinkle Krinkle self-assigned this Oct 13, 2017
Krinkle added a commit that referenced this issue Oct 13, 2017
Should fix the following kind of log error:

> WARN  [RCReader] CVNBot.RCReader [CVNBot1] Unmatched create2 event in en.wikipedia:
> #00314[[#00307Special:Log/newusers#00314]]#34 create2#00310 #00302#003 #35*#3
> #00303Ujju.19788#003 #35*#3  #00310created new account User:Upendhare#003

Fixes #30
Krinkle added a commit that referenced this issue Oct 13, 2017
Should fix the following kind of log error:

> WARN  [RCReader] CVNBot.RCReader [CVNBot1] Unmatched create2 event in en.wikipedia:
> #00314[[#00307Special:Log/newusers#00314]]#34 create2#00310 #00302#003 #35*#3
> #00303Ujju.19788#003 #35*#3  #00310created new account User:Upendhare#003

Fixes #30
Krinkle added a commit that referenced this issue Oct 15, 2017
Should fix the following kind of log error:

> WARN  [RCReader] CVNBot.RCReader [CVNBot1] Unmatched create2 event in en.wikipedia:
> #00314[[#00307Special:Log/newusers#00314]]#34 create2#00310 #00302#003 #35*#3
> #00303Ujju.19788#003 #35*#3  #00310created new account User:Upendhare#003

Fixes #30
Krinkle added a commit that referenced this issue Oct 15, 2017
Should fix the following kind of log error:

> WARN  [RCReader] CVNBot.RCReader [CVNBot1] Unmatched create2 event in en.wikipedia:
> #00314[[#00307Special:Log/newusers#00314]]#34 create2#00310 #00302#003 #35*#3
> #00303Ujju.19788#003 #35*#3  #00310created new account User:Upendhare#003

Fixes #30
@Krinkle Krinkle closed this as completed Oct 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant