Anope IRC Services
Anope Support => 2.0.x/1.9.x Support => Topic started by: Borja on January 30, 2014, 09:30:34 PM
-
Hello,
I have a Drupal site.
I am using m_sql_authentication module and db_sql_live and everything works fine.
I want to make a form in drupal where a user can create a channel. I need to send the command to create channel from php.
I am using 2.0.x release.
How I can do this?
Thanks.
-
I think you can try it like this;
if( $_POST['create'] == "channel" ) {
$nickname = $_POST['nickname'];
$channel = $_POST['channel'];
$password = $_POST['password'];
$descr = $_POST['descr'];
$chksum = md5("CHAN_REG:".$_POST["nickname"]." ".$_POST["channel"]." ".$_POST["password"]." ".$_POST["descr"].":".time().":supernova");
$cmd = "CHAN_REG";
$sqlcmd_checksum_salt = "supernova";
$params = "$nickname $channel $password $descr";
$tstamp = time();
$sql = "INSERT INTO database (cmd, params, tstamp, chksum, status) VALUES('$cmd','$nickname $channel $password $descr', '$tstamp', '$chksum', '0')";
.....
}
-
I have the same problem
How is table name? I don't view any table with this structure?
Can help me? thanks
-
Just insert the new channel into the channel table..