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

Registered users #6

Open
Varzeki opened this issue Dec 20, 2016 · 5 comments
Open

Registered users #6

Varzeki opened this issue Dec 20, 2016 · 5 comments

Comments

@Varzeki
Copy link
Owner

Varzeki commented Dec 20, 2016

At present the bot does not check if users are registered or not - this is abusable. The bot should check if the user has mode +r before responding to any non-help commands with something other than an error.

@Archina
Copy link
Collaborator

Archina commented Dec 20, 2016

It seems you can use NICKSERV for this purpose.

http://stackoverflow.com/questions/1682920/determine-if-a-user-is-idented-on-irc

I would recommend storing the actual verification command in the config so it is easier to port this to other IRC servers.

@Varzeki
Copy link
Owner Author

Varzeki commented Dec 20, 2016

I'm pretty sure IRC by default has a mode that nickserv sets - +r
Cinch already has the ability to check user modes, without querying another bot

if user.include? "r"
    true
else
    false
end

@Archina
Copy link
Collaborator

Archina commented Jan 29, 2017

The Cinch Doku says you can use Cinch - authed but it is only assured to work on Quakenet and Freenode.

Edit:
Okay, I have tested the authed? method and it works flawlessly on Rizon.

on :message, /^.test/ do |m|
	m.reply "Whoot #{m.user.authed?}"
end

Do you know how to access the other users? For when a command has a target.

@Varzeki
Copy link
Owner Author

Varzeki commented Feb 9, 2017

Cinch has a method for it somewhere - User('varzeki') will return a user object.

user = User('varzeki')
m.reply(user.host)

@ineeee
Copy link
Collaborator

ineeee commented Jan 20, 2019

indeed checking for +r is the recommended way. ircd says:

* umode :         +r     - User has been registered and identified for its nick.
* umode :                  This mode can be set by servers and services only.

should probably figure out how to use cinch for this, because User doesnt keep track of user modes.

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

3 participants