mIRC Home    About    Download    Register    News    Help

Print Thread
#130922 23/09/05 05:11 PM
Joined: Sep 2005
Posts: 44
R
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Sep 2005
Posts: 44
Is there anyway to code a database of somekind so people can only come into server if they r a registered nickname?

like when they open mIRC it will say either Register and once they have it says Log In?

if they register, it just says log in everytime they open mirc?

is this possible, if so cud u tell me a code or show me where i can learn to do it myself?

#130923 23/09/05 05:56 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Preventing someone from using mIRC for normal uses isn't very good. You could use a simple on start event if you really wanted to... though, doing so will annoy people.

For a game, just have people login/register using a popup dialog when they join the channel with the bot on it, or have them msg the bot with the login information.

As far as a database, a simple txt file is plenty good enough if it's staying on the bot and not being sent around to others.


Invision Support
#Invision on irc.irchighway.net
#130924 23/09/05 06:00 PM
Joined: Sep 2005
Posts: 44
R
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Sep 2005
Posts: 44
ok thanks,you know anywhere i could get a code for it?

#130925 23/09/05 06:11 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Code is a simple on text event with if statements and write/$read statements.

Code:
on *:text:!register &:?: {
  write users.txt $nick $2
}
on *:text:!login &:?: {
  if ($read(users.txt,s,$nick) == $2) {
    commands to mark user as logged in (variable maybe)
  }
}


Use /help /write and /help $read (actually, both are the same help file) to see how to use those properly.

Note that I used ? so that these commands only work in a query window. I also used & in the trigger to indicate that a word must be there rather than using if ($2 != $null).

NOTE: This is an example. I am not including checks to make sure people don't register multiple times (if they do so, they can only login with the first password in the current script). You need to learn to add error checking and writing scripts yourself as we can't provide every script you ask for. We're here to help explain how, not to do it for you. I've done a lot for you to be nice, but it's getting to about time for you to start doing it yourself and then asking for help when you can't make your own script work the way you want it to. Then, you provide what you've already written and we can help you to fix it rather than us doing everything for you. smile

Last edited by Riamus2; 23/09/05 06:15 PM.

Invision Support
#Invision on irc.irchighway.net
#130926 24/09/05 12:59 AM
Joined: Sep 2005
Posts: 44
R
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Sep 2005
Posts: 44
thanks.

I mean, when you open mirc and the status window is up, you click connect or whatever and it loads my server, but before you can do anything a popup box comes up and says enter Nickname and password. If the nickname and password entered isnt registered they cannot come on. otherwise they come in and they will not have to log in again unless they /resetscript.

also yes i will stop asking so many questions now and start doing it myself :-).

sorry for asking this much and thanks for helping me out.

also, in my server id like to have rooms that are on 24/7 with my bot in, 1 called Unregistered where if you log in with a username and password thats not registered you get put in that room and can only come out when ure registered, same as if i was to suspend someone for flooding to much or swearing at people they would be unregistered for so long till they are re registered.

I'll turn registring nicks of to public so only i may do it and each person may only have 1 reg nick.

Last edited by reece1312; 24/09/05 01:01 AM.
#130927 26/09/05 01:44 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
At that point, you do have to use server software. I think it's a bit excessive for what you want to do, but go for it. Install some server software that has services and set your channels to +R.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard