[WEB] Webchat v2.0 - Chat with the game on the web [1317]

Discussion in 'Inactive/Unsupported Plugins' started by Q.from.the.continuum, Aug 5, 2011.

  1. Webchat - Chat with the game on the website.

    Version: v2.0

    On this page you will see action this plugin: http://q-minecraft.pl

    [​IMG]


    Installation
    1. Extract the archive.
    2. Move chat2 to the directory web page. In the place where you want to have a chat add
      Code:
      <?php include 'chat2/index.php'; ?>
    3. You need to edit settings.php.
    4. Move WebChat.jar to the plugin folder in your bukkit serwer.
    5. Reload server, You'll see the errors is normal. Stop the server and edit a configuration file.
    6. You need to create a database in mysql: chatMC or change database in settings.
    7. Run server.
    I moved this topic here: http://dev.bukkit.org/server-mods/webchat/
    Please do not post in this topic, I will not update it or answer the questions in it.



    Download: http://q-serw.pl/storage/chat2.0.rar
    Version 2.0 may have some errors. I will try to fix them in version 2.1

    Changelog:

    Version 2.0
    • Plugin is written in Java.
    • Added sql file.
    • Added a basic css file.
    • Added ability to write from the website.
    • Fixed display of duplicate messages.
    • Improved code readability.
    Version 1.1
    • Fixed bugs related with mysql
    Version 1.0
    • First release.
    Features:

    • Adding possibilities of writing a chat with the website.
    • Writing the code more accessible
    • Adding a sample template css.
     
  2. Offline

    masteroftime

  3. I write there a new post? Because I can not move, and the moderators probably is not here?
     
  4. Offline

    DKDunnings

    ^^ all your base are belong to us.
     
    efstajas, Nikve and TfT_02 like this.
  5. ???
     
  6. Offline

    Yeti1337

    We are on Web2.0 -_-

    Joke :D
     
  7. Offline

    s1mpl3x

    report your post, should be moved then.
     
  8. Offline

    MonsieurApple

  9. Offline

    monotonehell

    @Q.from.the.continuum

    Clever idea to look at the logs but wouldn't it be more efficient to write a java plugin that sends chat lines directly to the db?

    A couple of points:
    It doesn't seem very future proof. If my quick look at your python script is right - you're searching the server.log for "2011" with other terms? What happens next year?
    Also logging onto a database as root? You should make a user with limited permissions.
     
  10. I can not write in Java, its only going to learn. I wanted to have the plugin on the website. I had to invent something, this is a result of this plugin.
    Write a new version for 2012
    You can change the username in the script to another.
     
  11. Offline

    Plague

    but really, read those guidelines
     
  12. I read, that i did something wrong ?
     
  13. Offline

    MonsieurApple

    Your post is not formatted properly. It needs to be formatted according to the guidelines...
     
  14. I changed a little (I hope that now it looks better). This is my firstforum lingual English. Please be patient and precise to say what I am doing wrong here.
     
  15. Offline

    Grrrr159

    How about having the interpreter with the download. It would be helpful :)
     
  16. As to the format in your first post, you need to add a change log with the last two versions (if applicable).
     
  17. Offline

    King Rat

    Nice to see people using the Python interpreter, good work!
     
  18. Offline

    Plague

    changelog is missing, did you really read those guidelines?
     
  19. Thank you very much for the reply from the changelog.
    Edited post. Is it now okay?
     
  20. Offline

    DutchCraft

    Plugin looks promising, Don't like the irc concept of chatting.

    Can't wait for this feature: Adding possibilities of writing a chat with the website.
    Will start to use it when that's implemented.

    Maybe forge it in with HeroChat Channels? make a HeroChatChannel to view and talk to your webchat.
     
  21. Offline

    seriosbrad

    @Q.from.the.continuum

    can you supply us with a .sql file to import? I don't know what type of table I am supposed to create
     
  22. @seriosbrad
    The file silnik.php you create tables.

    I have not used this plugin. As I will have time to see what we can do
     
  23. Offline

    qixx

    It does not work for me...
    I started chat.py but the cmd window dont show anything.
    My Website doesn't show anything, too.
    What ist wrong?

    Python 2.7
     
  24. @qixx
    any error you do not show? What do you use the system?
     
  25. Offline

    qixx

    Windows 7ultimate x64
     
  26. @qixx
    List of players must be in "<>" example "<player>"
    You have to set permission
     
  27. Offline

    qixx

    Oh, I have to install Bukkit Permissions?
     
  28. @qixx
    Yes, you have to.
    And you have to set:
    Code:
    prefix: '<+name>'

    To login was "<>".
     
  29. Offline

    GeekPlaya

    After a ton of manual work and getting the MYSQL library installed, etc.

    I run ./chat.py and after pressing the return key, nothing happens.

    It is in the same directory as 'server.log'.
    The database information is correct.
    The table exists.
    No rows are being inserted though. Even if someone sends a message.

    My current chat.py:
    Code:
    #!/usr/bin/python
    
    #importowanie potrzebnych bibliotek
    import MySQLdb
    import time
    import re
    
    ######## DEMON SETTINGS ############
    
    # mysql
    host="localhost"
    user="root"
    haslo="***"     # password
    baza="chatMC"    #database
    
    # others settings
    log_file="server.log"              # path to the log file
    
    ###################################
    
    # open file
    def search_in_file(File):
      f = open(File, "rb");
      # back to end file
      f.seek(-300, 2);
      #read 300 char
      tag = f.read(300)
    
      dane=[]
      a=0
      b=re.findall("<", tag)
    
      while len(b) > a:
    
        d=tag[tag.find("[INFO]"):]
        d=d[:d.find("2011")]
        d=d[d.find("]")+1:d.find("[0m")-1]
        if d.find("<") != -1:
          dane.append(d)
    
        tag=tag[tag.find(d):]
        a=a+1
      return dane
    
    text=""
    # mysql connect
    conn =MySQLdb.connect(host="localhost",user="root",passwd="***",db="chatMC",unix_socket="/opt/lampp/var/mysql/mysql.sock")
    c = conn.cursor()
    
    A=[]
    
    #funkcja filtrujaca
    def filtrowanie(C):
    
      B=search_in_file(log_file) #nowy zbior
      #print B
      for X in B:
        if (X in C)==False:
    
          print "-> "+  X
          c.execute("INSERT INTO chat (id, wpis) VALUES (NULL, '"+X.replace("",'')+"')")
          conn.commit()
          C.append(X)
      return C
    
    while 1:
    
      A=filtrowanie(A)
      time.sleep(0.25)
    
    # [[33m
    
    [​IMG]

    I AM SO SORRY! IT WORKS!

    Ok, attention all who read.

    If when you run ./chat.py and nothing appears, type a message in game and check back at the command console and you will see that it works.

    Dear plugin creator: I highly recommend you convert this to Java and use the java mySQL connector. You will get more users and it requires less work.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016

Share This Page