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

atheme2json exits when a channel doesn't have founder, but does have a successor #1403

Closed
kylef opened this issue Nov 27, 2020 · 3 comments
Closed
Assignees
Milestone

Comments

@kylef
Copy link
Contributor

kylef commented Nov 27, 2020

I think this would be under the circumstances where the founder deleted their account, the script will emit the following:

$ python atheme2json.py services.db test.json
Traceback (most recent call last):
  File "atheme2json.py", line 133, in <module>
    sys.exit(main())
  File "atheme2json.py", line 127, in main
    output = convert(infile)
  File "atheme2json.py", line 119, in convert
    raise ValueError("no user corresponding to channel founder", chname, chdata.get('founder'))
ValueError: ('no user corresponding to channel founder', '#channel', None)

Where Atheme's ChanServ INFO for the channel would show something like:

> INFO #channel
ChanServ: Information on #channel:
ChanServ: Founder    :
ChanServ: Successor  : nick-of-successor
...

Atheme's help for ChanServ (/msg ChanServ HELP) emits the following:

<ChanServ> ***** ChanServ Help *****
<ChanServ> ChanServ gives normal users the ability to maintain control
<ChanServ> of a channel, without the need of a bot. Channel takeovers are
<ChanServ> virtually impossible when a channel is registered with ChanServ.
<ChanServ> Registration is a quick and painless process. Once registered,
<ChanServ> the founder can maintain complete and total control over the channel.
<ChanServ> Please note that channels will expire after 180 days of inactivity,
<ChanServ> or if there are no eligible channel successors.
<ChanServ> Activity is defined as a user with one of +FHORafhoqrsv being on the channel.
<ChanServ> Successors are primarily those who have the +S (if available) or +R flag
<ChanServ> set on their account in the channel, although other people may be chosen
<ChanServ> depending on their access level and activity.

In which it states that the successor can be used (base on "+S (if available) or +R flag" or "although other people may be chosen depending on their access level and activity" in which, perhaps it would make sense for the script to elect the successor (unless Oragono has a similar concept). I can try and make a fix, we would have to introduce logic to determine a successor based on all the CA lines.

@kylef kylef changed the title atheme2json exits when a channel doesn't have foundation, but does have a successor atheme2json exits when a channel doesn't have founder, but does have a successor Nov 27, 2020
@kylef
Copy link
Contributor Author

kylef commented Nov 27, 2020

I also wonder, will there be a case where there won't be a successor. Oragono could remove the channel in this case based on:

Please note that channels will expire after 180 days of inactivity, or if there are no eligible channel successors.

Perhaps it would make sense to emit a warning for these cases to the user so they are aware that a successor was elected or a channel was removed.

@slingamn
Copy link
Member

We'll move these to https://github.com/oragono/migration-tools (you can create a PR there).

@slingamn slingamn assigned slingamn and unassigned kylef Dec 4, 2020
@slingamn
Copy link
Member

slingamn commented Dec 4, 2020

Assigning to myself to fix up the successor issue. We'll postpone migrating to the new repo.

@slingamn slingamn added this to the v2.5 milestone Dec 4, 2020
slingamn added a commit to slingamn/ergo that referenced this issue Dec 7, 2020
Handle the case where atheme had a successor, but didn't correctly
elect them as founder (?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants