Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Mysql Adduser  (Read 4294 times)

0 Members and 1 Guest are viewing this topic.

TheSkorm

  • Guest
Mysql Adduser
« on: January 02, 2007, 12:25:38 AM »

Is it possible to add users via mysql? At the moment I have a php bot that joins and registers for users, examples would be nice :> .
Logged

Jobe

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1023
    • Anope IRC Services
(No subject)
« Reply #1 on: January 02, 2007, 12:56:32 AM »

At present it is NOT possible to add users via MySQL.
Logged
Your IP: ()
My IRC Status:

Come along and visit http://www.anopequotes.org/

freeraid

  • Guest
(No subject)
« Reply #2 on: January 04, 2007, 11:39:15 AM »

Mod edit: abusive posts will NOT be tolerated

TheSkorm, if your hoster autorize socket, you can.

Quote

<?
$host = "irc.playersonline.org";
$port = 6667;
if ($nick != "" && $pass1 != "" && $pass2 != "" && $email != "") {
if ($pass1 == $pass2) {
if ($sock = @fsockopen($host, $port)) {
fputs($sock, "USER php_reg localhost localhost :register\r\n");
fputs($sock, "NICK $nick\r\n");
while ($line = fgets($sock,1024)) {
$a = explode(" ", $line);
if ($a[0] == "PING") {
fputs($sock, "PONG $a[1]");
}
if ($a[1] == "MODE") {
fputs($sock, "PRIVMSG nickserv :register $pass1 $email\r\n");
fputs($sock, "QUIT\r\n");
}
if ($a[1] == 433) {
echo "Ce pseudo est déjà présent sur le chat";
fputs($sock, "QUIT\r\n");
exit;
}
if ($a[0] == ":Nickserv@Services.IRCFrance.Org") {
$b = explode(" :", $line);
$c = explode(".", $b[1]);
echo "$c[0]<br>";
exit(1);
}
}
}
else {    
echo "Erreur lors de la connexion à $host:$port<br>";
}
}
else {
echo "Les mots de passe doivent être identiques<br>";
}
}else {
echo "Veuillez remplir le formulaire dans son intégralité<br>";
}
?>


Jobe1986, now, i thinks you can explain what is this script, how to configure it, and translate in english.

You can find an official source here :
http://www.phpcs.com/codes/ENREGISTREMENT-NICKSERV-VIA-IRC-BOT_26493.aspx

[Edited on 4-1-2007 by heinz]
Logged

Jobe

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1023
    • Anope IRC Services
(No subject)
« Reply #3 on: January 04, 2007, 01:36:54 PM »

Mod edit: counter-flame removed as previous post edited

[Edited on 4-1-2007 by heinz]
Logged
Your IP: ()
My IRC Status:

Come along and visit http://www.anopequotes.org/

katsklaw

  • Guest
(No subject)
« Reply #4 on: January 04, 2007, 04:27:06 PM »

freeraid, what Jobe meant is that it's pointless to make changes to your anope sql database from outside IRC. This is becase Anope will erase and overwrite any changes at the next update. Yes of course you may make changes from inside IRC using a script or bot as your example shows. However, please bear in mind that 99.99% of the time, when that question is asked it's meant from outside IRC as like from SSI or other server side scripting.

Jobe is also right, this is not a good place to start a flamewar. They are not allowed here and this paticular one was uncalled for on your behalf. this forum is for getting help, not for getting flamed and unlike other IRC related communities, we have a zero tolerance for such displays.

Please heed this advice as it's likely your only warning.
Logged
Pages: [1]   Go Up