• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

/forcenick command not working

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
6 posts • Page 1 of 1

Postby Hationyx » Sun Nov 14, 2010 4:09 pm

Hi I'm new here, and I didn't really want to necro with my first post, so this concerns the /forcenick command from the contributions board http://www.phpfreechat.net/forum/viewtopic.php?id=3914

I think that it's a wonderful command that would be useful, if not completely necessary for administrator humour. After adding it in, and rehashing, my first attempt was met with the response "can't change an admin nick" on somebody who wasn't an admin. on my second try on a different user, i met the same response, despite the fact that they were not an admin.

I'm wondering if perhaps I'm doing something glaringly incorrect, or if the command doesn't work with the newer version?
Hationyx
New member
 
Posts: 5
Joined: Sun Nov 14, 2010 3:50 pm
Top

Postby OldWolf » Sun Nov 14, 2010 8:39 pm

Could we see your index.php?
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby Hationyx » Mon Nov 15, 2010 1:15 am

Code: Select all
<?php

require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "A chat room";
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["debug"] = false;
$params["skip_proxies"] = array('censor');
$params["startwithsound"] = false;
$params['admins'] = array('Hati'  => 'skoll');
$chat = new phpFreeChat( $params );

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>phpFreeChat- Sources Index</title>
  <link rel="stylesheet" title="classic" type="text/css" href="style/generic.css" />
  <link rel="stylesheet" title="classic" type="text/css" href="style/header.css" />
  <link rel="stylesheet" title="classic" type="text/css" href="style/footer.css" />
  <link rel="stylesheet" title="classic" type="text/css" href="style/menu.css" />
  <link rel="stylesheet" title="classic" type="text/css" href="style/content.css" /> 
 </head>
 <body>


<div class="content">
  <?php $chat->printChat(); ?>
  <?php if (isset($params["isadmin"]) && $params["isadmin"]) { ?>
    <p style="color:red;font-weight:bold;">Warning: because of "isadmin" parameter, everybody is admin. Please modify this script before using it on production servers !</p>
  <?php } ?>
</div>
   
</body></html>
Hationyx
New member
 
Posts: 5
Joined: Sun Nov 14, 2010 3:50 pm
Top

Postby OldWolf » Mon Nov 15, 2010 9:18 pm

Well, your index looks sound. It's possible 1.3 broke it, but it was working with 1.2, and the changes between the two were actually fairly minor. Try posting on that thread and see if the original author has upgraded to 1.3 (sometimes they subscribe to their threads so they know when someone posts on them).
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby Hationyx » Mon Nov 15, 2010 10:12 pm

After installing a serperate version of 1.2 and getting the same result, it turns out i'm just an idiot.
I've been typing old_ and new_ with the chat command, which causes the response "cannot change an admin"
It works when I don't type those prefixes.

So yeah, nevermind. Gosh I'm an idiot. But thanks for your help |D
Hationyx
New member
 
Posts: 5
Joined: Sun Nov 14, 2010 3:50 pm
Top

Postby OldWolf » Tue Nov 16, 2010 9:32 am

No problem at all, we all make mistakes, that doesn't make you an idiot.
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top


Post a reply
6 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 11 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub