PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#1 2005-05-28 13:23:15

Connorhd
Member
Registered: 2005-01-15
Posts: 176

Chat Mod 1.0

Code:

##
##
##        Mod title:  Chat Mod
##
##      Mod version:  1.0
##   Works on PunBB:  1.2.x
##     Release date:  2005-05-28
##           Author:  Connorhd (connorhd@mypunbb.com)
##
##      Description:  Adds an irc chat room to punbb
##
##   Affected files:  none
##
##       Affects DB:  Yes
##
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

Download here

Offline

 

#2 2005-05-29 10:28:47

Bulgaricus
Member
From: Warsaw, Poland
Registered: 2005-05-12
Posts: 40
Website

Re: Chat Mod 1.0

Is there a possibilty that nicks with Polish and Bulgarian letters are recognised? Some of my users has usernames with Polish/Bulgarian letters and they can not enter the chat (i.e. Jaś, Eва).


www.bulgaricus.com
All about Bulgaria in Polish

Offline

 

#3 2005-05-29 11:16:50

Connorhd
Member
Registered: 2005-01-15
Posts: 176

Re: Chat Mod 1.0

ahh i never thought of that, what happens when they try to chat? i'll probably need to make a script to tidy up nicknames

Offline

 

#4 2005-05-29 11:25:53

Bulgaricus
Member
From: Warsaw, Poland
Registered: 2005-05-12
Posts: 40
Website

Re: Chat Mod 1.0

There is a message:
"{nick} Erraneous Nickname: Illegal characters
Error: closing link: {IP} (Ping timeout)
Disconnected from irc.matrixchat.us"


www.bulgaricus.com
All about Bulgaria in Polish

Offline

 

#5 2005-05-29 11:30:51

Bulgaricus
Member
From: Warsaw, Poland
Registered: 2005-05-12
Posts: 40
Website

Re: Chat Mod 1.0

Is there possibilty to disallow users change their nicks to nicks of other users. I entered chat as not logged user, wrote "/nick {admin}" and it changed. I supposed that way I do not have the authority of admin but other users may hink that I am the admin.


www.bulgaricus.com
All about Bulgaria in Polish

Offline

 

#6 2005-05-29 11:39:00

Bulgaricus
Member
From: Warsaw, Poland
Registered: 2005-05-12
Posts: 40
Website

Re: Chat Mod 1.0

I found a strange thing: all Polish letters can be written on the chat (ążęśćł) instead of one (). Cyrylic letters (all) are displayed like (?). What can be the reason?


www.bulgaricus.com
All about Bulgaria in Polish

Offline

 

#7 2005-05-29 12:08:09

Connorhd
Member
Registered: 2005-01-15
Posts: 176

Re: Chat Mod 1.0

its the encoding of the chat i guess, however there are more rules on what can be put in a nickname, and no anyone can change their nick theres not much i can do about that

Offline

 

#8 2005-06-10 20:29:26

legabier
Member
Registered: 2004-12-16
Posts: 11

Re: Chat Mod 1.0

Is it possible to specifie a specific port?

Offline

 

#9 2005-07-23 10:16:26

legabier
Member
Registered: 2004-12-16
Posts: 11

Re: Chat Mod 1.0

The solution for a specific port:

forum/chat.php

Code:

<object name="pjirc" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,0" height="400" width="100%"> 
..after this line add:
<param name="port" value="1234" />

<object name="pjircb" codebase="chat/" classid="java:IRCApplet.class" archive="irc.jar, pixx.jar" height="400" width="100%">
..after this line add:
<param name="port" value="1234" />

Offline

 

#10 2005-07-23 12:08:11

Connorhd
Member
Registered: 2005-01-15
Posts: 176

Re: Chat Mod 1.0

hmm sorry i didn't think about that, can you not do irc.server.com:1234 ?

Offline

 

#11 2005-07-25 00:26:22

legabier
Member
Registered: 2004-12-16
Posts: 11

Re: Chat Mod 1.0

"irc.server.com:1234" or "irc.server.com 1234" as server name in the Admin Mod Chat config are not working.
Adding theses two lines in the chat.php (previous post) and it's OK.

old things I wrote:

For the Username/Nickname I have maked a little change on chat.php.

Replaced this:

Code:

$chat_nick = $pun_user['username'];
$chat_altnick = $pun_user['username']."??";
$chat_ident = $pun_user['username'];

By this:

Code:

function makeNickFriendly($TheNick) {
    $avant=" '";
    $apres="AAAAAAaaaaaaOOOOOOooooooEEEEeeeeCcIIIIiiiiUUUUuuuuyNn_`";
    $TheNick = strtr($TheNick,$avant,$apres);
    $TheNick = trim($TheNick,"\!\"\$\%\&\\(\)\*\+\,\-\.\/\:\;\<\=\>\?\@\~\#");   // <-- This line is not correct
    $TheNick = ltrim($TheNick,"0123456789");
    $TheNick = substr("$TheNick", 0, 32);
    return $TheNick;
}
    $chat_nick = makeNickFriendly($pun_user['username']);
    $chat_altnick = makeNickFriendly($pun_user['username']."??");
    $chat_ident = makeNickFriendly($pun_user['username']);

So a PunBB's username as  +)*&?#%$/"@77|^P'tt tst
Return this to IRC server: |^P`tit_tEst

(It was my better english,..)

Ok, it was a little buggy.

.
.
.

This is better:


Code:

function makeNickFriendly($TheNick) {
    $avant=" '";
    $apres="AAAAAAaaaaaaOOOOOOooooooEEEEeeeeCcIIIIiiiiUUUUuuuuyNn_`";
    $TheNick = strtr($TheNick,$avant,$apres);
    $AcceptedChars = preg_quote("[]\`_^{|}");
    $TheNick = preg_replace("/[^a-zA-Z0-9$AcceptedChars]/", "\$1", $TheNick);
    $TheNick = ltrim($TheNick,"0123456789");
    $TheNick = substr("$TheNick", 0, 32); // <-- supposing that ircd supports 32 characters for nicks
    return $TheNick;
}
    $chat_nick = makeNickFriendly($pun_user['username']);
    $chat_altnick = makeNickFriendly($pun_user['username']."??");
    $chat_ident = makeNickFriendly($pun_user['username']);

I think it's OK now.

Last edited by legabier (2005-10-16 09:49:26)

Offline

 

#12 2005-07-25 00:49:44

Connorhd
Member
Registered: 2005-01-15
Posts: 176

Re: Chat Mod 1.0

oh cool i'll bundle that in the next version smile

Offline

 

#13 2005-08-25 16:31:59

zapher
New member
Registered: 2005-08-25
Posts: 3

Re: Chat Mod 1.0

Connorhd wrote:

oh cool i'll bundle that in the next version smile

An uninstall for this would be nice.

I can't get this to work at all. I just seen the green border, nothing happends (Mac OS X Firefox).
Haven't tried on IE.

Offline

 

#14 2005-09-21 00:31:55

-J-
Member
Registered: 2005-05-24
Posts: 27

Re: Chat Mod 1.0

Is the current version working with punbb 1.2.7?

Offline

 

#15 2005-09-25 11:23:03

Pure
New member
Registered: 2005-09-25
Posts: 4

Re: Chat Mod 1.0

Nice mod, I tried to install it into 1.2.7 and I have the whole interface actually "working", but I get a "Cannot connect" message. Any idea why? Very useful mod smile

Offline

 

#16 2005-11-01 01:58:35

pierrera
Guest

Re: Chat Mod 1.0

hi, I can't use it, I setted my forums in English but it still not works :s

 

#17 2005-11-01 08:09:57

Connorhd
Member
Registered: 2005-01-15
Posts: 176

Re: Chat Mod 1.0

Pure, probably a problem with the server you put in or your connection?

pierrera, Maybe if you told us why it didn't work we could help?

Offline

 

#18 2005-11-08 21:35:07

legabier
Member
Registered: 2004-12-16
Posts: 11

Re: Chat Mod 1.0

-J- wrote:

Is the current version working with punbb 1.2.7?

Recently upgraded from 1.2.1 to 1.2.10, chat mod always work well.

Offline

 

#19 2005-11-09 19:44:05

uamuzeme
Guest

Re: Chat Mod 1.0

I have a few questions:

1. I notice that the person with the @ in front of their name is the one that can ban/kick people. It seems that that person is the first one in the room. How can that be changed?

2. How do you unban people?

3. How do I stop people from changing their nick?

Last edited by uamuzeme (2005-11-09 19:44:35)

 

#20 2005-11-09 23:23:45

legabier
Member
Registered: 2004-12-16
Posts: 11

Re: Chat Mod 1.0

uamuzeme wrote:

1. I notice that the person with the @ in front of their name is the one that can ban/kick people. It seems that that person is the first one in the room. How can that be changed?

The first to enter a channel create that channel and automaticaly become the operator (@).
If you don't want that, you need to put a bot in your channel to take your channel open and the @ to your bot.

uamuzeme wrote:

2. How do you unban people?

Bans can be ereased by a @.
All bans (and all other things) are cleared when the last person quit the channel.
If there always at least one person in your chan and he don't have the @, you can't do anything,..

uamuzeme wrote:

3. How do I stop people from changing their nick?

Impossible. All theses commands (ban, unban, kick, nick) are in the IRC server, not in the chat mod.
I don't know server not permiting to change your nick,..

(sorry for my poor english)

Offline

 

#21 2005-11-23 16:01:58

rolfio
Guest

Re: Chat Mod 1.0

is there a way to update the chat mod with a "people in chatroom" feature? At the startpage of the forum you have the users online. Maybe you could add the users in chatroom.

I dont know if it is possible.

 

#22 2005-11-23 16:54:53

shamman
Member
Registered: 2005-11-21
Posts: 42

Re: Chat Mod 1.0

This Chat mod has a bugg. When implemented to a forum and someones using Firefox browser whole header becomes active and if someone will ie. register, it always displayed - You have no permission to access this site - this all cause when clicked on this things that becomes active - including login string - all users are redirected to chat room. Dunno why but its true i've tryed this mod and I must him after a smash of PMs and ICQ mess. from my users, deleted.
I think its a bugg in the JS maybe.

Offline

 

#23 2005-11-23 18:16:56

Connorhd
Member
Registered: 2005-01-15
Posts: 176

Re: Chat Mod 1.0

rolfio its not possible.

shamman, huh? wtf

Offline

 

#24 2005-11-23 23:28:13

legabier
Member
Registered: 2004-12-16
Posts: 11

Re: Chat Mod 1.0

rolfio: To have this information, you need to be connected to the IRC server and in the #channel. Maybe you can with a bot on the same server updating a file containing the list of users in a #channel. It's an idea, I don't know how to do this.

shamman: nerver encoured this bug, using FF 1.0 and 1.5. We have ~1800 members in my forum and no report of this kind.

Offline

 

#25 2005-11-24 11:29:06

shamman
Member
Registered: 2005-11-21
Posts: 42

Re: Chat Mod 1.0

Sorry Connorhd it wasnt your mod it was PM Message mod, and it was my error i have wrong istalled PM mod, now its everything ok.
Mea Culpa. But i have a question. Is it possible to include a script to main forum page that shows who is online in the chat room?
And I have a trouble now to include another script but this dont corespond with this theme, but if anyone can spend a little time to help me its in the section Source Code/ How to Add a refresh script?.
And again sorry about my post.

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.