1. Post #81
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Out of curiosity, why did you add meta:HasDJRights() to 3 (probably 4) files? Couldn't you just add 1 shared file?
    There is a default fallback in each of the main files, and an override in each of the configs. So yes, four.

    Because I'm lazy and didn't feel like making a shared file for something as small as one function. Do it yourself if you are so inclined, but it doesn't break anything.

    Also, if you want to have the server recognize certain people, but not the client, it is easier this way. Dunno why you'd want to, but it's there if you do.

  2. Post #82
    Gold Member
    Fleamonji's Avatar
    April 2010
    627 Posts
    Oh, I see :)

    Edited:

    Damn nice addon, but I noticed a bug. Song names with ' in them fuck up when being confirmed.

  3. Post #83
    Gold Member
    Fleamonji's Avatar
    April 2010
    627 Posts
    Also, it would be nice to have it stop doubles from being added

    Edited:

    damn automerge broke

  4. Post #84
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    The ' is an escaping issue, which is weird, because they should be being escaped...

    How would you stop doubles from being added? Based off the name? People will just rename it. And you might have two versions of the same song that have the same name, different artist, etc.

    It's up to you to prevent doubles, through rules or moderation. If you want to modify the code to do it, feel free, but I'm not going to do it for you.

  5. Post #85
    Gold Member
    Fleamonji's Avatar
    April 2010
    627 Posts
    You could add a unique ID to the song in the table.

  6. Post #86
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    You could add a unique ID to the song in the table.
    To what field? The song name? The artist and songname? See above for why I'm not going to. Again, if you want to, feel free, but I'm not doing it for the public version.

  7. Post #87
    Gold Member
    Fleamonji's Avatar
    April 2010
    627 Posts
    To what field? The song name? The artist and songname? See above for why I'm not going to. Again, if you want to, feel free, but I'm not doing it for the public version.
    I haven't looked at the code, but it's all put into a table, right? If so, just give each one their own unique ID...

  8. Post #88
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    I haven't looked at the code, but it's all put into a table, right? If so, just give each one their own unique ID...
    Just keep in mind that if you Unique the song title field, then it will silently fail when you try to add a song title that already exists. Even if the artist is different.

  9. Post #89
    Gold Member
    Fleamonji's Avatar
    April 2010
    627 Posts
    Just keep in mind that if you Unique the song title field, then it will silently fail when you try to add a song title that already exists. Even if the artist is different.
    I'm not making the song name unique.....

  10. Post #90
    yuriman's Avatar
    January 2009
    566 Posts
    Just keep in mind that if you Unique the song title field, then it will silently fail when you try to add a song title that already exists. Even if the artist is different.
    He means each song should have a unique ID as in a integer which counts up for every song you add.
    Reply With Quote Edit / Delete Reply Sweden Show Events Agree Agree x 1 (list)

  11. Post #91
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    He means each song should have a unique ID as in a integer which counts up for every song you add.
    It already does....

  12. Post #92
    Gold Member
    Fleamonji's Avatar
    April 2010
    627 Posts
    It already does....
    Then how hard would it be to make it not add doubles?

  13. Post #93
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    You're apparently not getting anything I'm telling you.

    What does having a unique row ID have to do with anything? Making it so you can't add double songs is a very difficult issue. How do you define a song as unique? By the song name? I've already told you the issue with this. In case you forgot, if you have unique song names, then if you have another song by the same name, but a different artist, it will still kick it out.

    If you make the combination of unique song name and artist unique, then you just have to rename the song, and you bypass it. If you do an MD5 hash of the file contents, then you just have to change the file slightly (such as modifying the metadata encoded in the file), and you bypass that as well.

    If you wish to implement any of the above options, I am not stopping you. However for the public release, I am not going to implement it unless I get a LOT more people asking for it, since it is easier to add, provided you know what you're doing, than to remove, assuming you do not.

  14. Post #94
    Gold Member
    Fleamonji's Avatar
    April 2010
    627 Posts
    Goddamn, again, give each song their own unique number in the table. If anything in the queue has that ID, return false when adding.
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 1 (list)

  15. Post #95
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Goddamn, again, give each song their own unique number in the table. If anything in the queue has that ID, return false when adding.
    And what is a SONG? The name? The artist? The file?

    ALL of these are mentioned in my above post. If you have another means of identifying what exactly a SONG is, then please let me know.

  16. Post #96
    Gold Member
    Fleamonji's Avatar
    April 2010
    627 Posts
    You said it was stored in a goddamned table.

    table.insert(songs, {name = title, length = time, uid = newid, artist = sartist})

  17. Post #97
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    You have still failed to answer my question... What qualifies as unique?

  18. Post #98
    Gold Member
    Fleamonji's Avatar
    April 2010
    627 Posts
    A number that increases by 1 for every song added.
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 3 (list)

  19. Post #99
    Nick Clegg's Avatar
    April 2011
    223 Posts
    A number that increases by 1 for every song added.
    Right, so what happens when you add a duplicate song? You end up with two of the same song with different identifiers..

  20. Post #100
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Right, so what happens when you add a duplicate song? You end up with two of the same song with different identifiers..
    Ding ding ding!

    At least someone understands....

    Edited:

    A number that increases by 1 for every song added.
    Also, it already DOES this. Like I've ALREADY said.

  21. Post #101
    yuriman's Avatar
    January 2009
    566 Posts
    You could make a query when a song is added and do something like this

    $hash = md5($songtitle . $songartist);
    $query = "SELECT count(*) FROM `songs` WHERE md5(`title` + `artist`) = $hash;";
    
    And then check if the count(*) is greater then 0
    Edited:

    I do not know the variable names you use since i havnt looked at the code.

  22. Post #102
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    You could make a query when a song is added and do something like this

    $hash = md5($songtitle . $songartist);
    $query = "SELECT count(*) FROM `songs` WHERE md5(`title` + `artist`) = $hash;";
    
    And then check if the count(*) is greater then 0
    Edited:

    I do not know the variable names you use since i havnt looked at the code.
    Only prevents duplicates of the exact file md5, which is rare. Changing the meta data changes the md5.

  23. Post #103
    yuriman's Avatar
    January 2009
    566 Posts
    No it prevents you from having a song with the same title and artist. You can lower it if you want it to be prevent duplications with different uppercase and lowercase characters

  24. Post #104
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    No it prevents you from having a song with the same title and artist. You can lower it if you want it to be prevent duplications with different uppercase and lowercase characters
    Sorry, didn't actually look what was in the MD5. I'm getting frustrated with this.

    Here is my final word on the matter.

    Is it possible to have very basic unique checks? Yes, but none of them are fool proof in any way, and most of them lead to a user mistagging something. So for the public release I am not going to implement it. If you want to implement it yourself, you have my full permission. You can even post what you did here so other can do it to. But I am not doing it for the public build.

  25. Post #105
    Gold Member
    Fleamonji's Avatar
    April 2010
    627 Posts
    Right, so what happens when you add a duplicate song? You end up with two of the same song with different identifiers..
    No....each song added to the entire list has its own ID. When a song is added to the queue, that ID copies over. If the song you're trying to add has an ID of one in the queue, return false.

    it's really not that hard.

  26. Post #106
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    No....each song added to the entire list has its own ID. When a song is added to the queue, that ID copies over. If the song you're trying to add has an ID of one in the queue, return false.

    it's really not that hard.
    OH! You're talking about adding songs to the QUEUE, not to the DATABASE.

    In that case, yes it is also entirely possible, but I'm not going to add it because some people like to listen to the same song in a row. You are free to modify the code to your liking.

  27. Post #107
    NOVS 12's Avatar
    January 2010
    20 Posts
    I got an Internal Server Error on my web server.
    "The server encountered an internal error or misconfiguration and was unable to complete your request."

    Thats what happens after I enter the user name and password to enter the site.

    I did change the path in .htaccess

    Any help appreciated.

  28. Post #108
    Gold Member
    Fleamonji's Avatar
    April 2010
    627 Posts
    I got an Internal Server Error on my web server.
    "The server encountered an internal error or misconfiguration and was unable to complete your request."

    Thats what happens after I enter the user name and password to enter the site.

    I did change the path in .htaccess

    Any help appreciated.
    Are you 100% sure the path is correct? I had the same issue, but I discovered my host's control panel told me the wrong path.

    Edited:

    It went away when I fixed it..

  29. Post #109
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Are you 100% sure the path is correct? I had the same issue, but I discovered my host's control panel told me the wrong path.

    Edited:

    It went away when I fixed it..
    This. The 500 error is what happens when your .htaccess file is invalid. For security reasons, and technical ones, it gives that error if there is something wrong in the file, so triple check it.

  30. Post #110
    Carson B's Avatar
    March 2008
    41 Posts
    Okay all previous problems i got around (so removed them)

    But i have issue.. In-game when I press F7 nothing happens, at all, not even errors, its as if F7 isnt binded to anything. I tried switching it to F3 still nothing, any ideas?

  31. Post #111
    FlapadarV2's Avatar
    December 2010
    1,802 Posts
    Is it possible to have it so as when guests add a new request, it removes their old one? I'm getting shit like this on my server:

    Code:
    [WolfDJ] Pelf wants to play  At A Medium Pace
    This song needs 2 more nominations to play.
    [WolfDJ] Pelf wants to play  Backstabber
    This song needs 2 more nominations to play.
    [WolfDJ] Pelf wants to play  Highway To Hell
    This song needs 2 more nominations to play.
    [WolfDJ] Pelf wants to play  No Quarter
    This song needs 2 more nominations to play.
    [WolfDJ] Pelf wants to play  Vegemite
    This song needs 2 more nominations to play.
    [WolfDJ] Pelf wants to play  Fun Fun Fun
    This song needs 2 more nominations to play.
    [WolfDJ] Pelf wants to play  Up Above My Head
    This song needs 2 more nominations to play.
    [WolfDJ] Dr.HAX! [RUS] wants to play  Robots Ftw
    This song needs 2 more nominations to play.
    Player Placardman left the game (Disconnect by user.)
    [WolfDJ] [THB] poo_fo [NL] wants to play  Doom Level 1
    This song needs 2 more nominations to play.
    [WolfDJ] Pelf wants to play  Rasputin
    This song needs 2 more nominations to play.
    *DEAD* (TEAM) Andy19926: !votekick Pelf So much music?!
    Player ers35 has joined the game
    (TEAM) [ivG] dastreet 2K10: /vote highway to hell
    [WolfDJ] The Communist Duck wants to play  Cigaro
    This song needs 2 more nominations to play.
    [WolfDJ] [THB] poo_fo [NL] wants to play  Robots Ftw
    This song needs 1 more nominations to play.
    [WolfDJ] The Communist Duck wants to play  Gay Bar
    This song needs 2 more nominations to play.
    (TEAM) [ivG] dastreet 2K10: !vote song Robots Ftw
    *DEAD* (TEAM) [THB] poo_fo [NL]: its f7
    [WolfDJ] The Communist Duck wants to play  A Friend In Need
    This song needs 2 more nominations to play.
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Agree Agree x 1 (list)

  32. Post #112
    Zombiedance's Avatar
    June 2009
    243 Posts
    Everytime i try to open my index.php i get a fatal error that me and my friend just cant seem to fix it says:

    Fatal error: Class 'SQLiteDatabase' not found in /home/a6241867/public_html/admin/lib/DB.php on line 9

    Please can anyone help?

  33. Post #113
    CawldFussuian's Avatar
    May 2011
    165 Posts
    Enable the SQL Lite module. in php.ini

  34. Post #114
    Zombiedance's Avatar
    June 2009
    243 Posts
    That's what i thought but we cant find that file for our lives we have the path to it but we just cant get to it. We made a ini.php page to give us all the information. But every time we try to go to that directory in our web server we get an error saying nothings there. In case it helps this is out path basic: /usr/local/lib/php.ini

  35. Post #115
    CawldFussuian's Avatar
    May 2011
    165 Posts
    For CentOS and some other OS's the ini file is located in /etc/php.ini
    Tell me what OS you are running and i look up the specifics.

    If you are not hosting from a VPS or a Dedicated Server, and its a web only host. you should make a ticket and ask them to enable sql lite.

  36. Post #116
    Zombiedance's Avatar
    June 2009
    243 Posts
    I found out the problem and its just not worth the work to bother. I'm going to get a web server from http://www.a2hosting.com/database/sqlite-hosting saves me a lot of time and work.

  37. Post #117
    CawldFussuian's Avatar
    May 2011
    165 Posts
    That won't help you, that's a database host. now a web host.

  38. Post #118
    Zombiedance's Avatar
    June 2009
    243 Posts
    Yeh i noticed that shortly after i posted but my power went out.

  39. Post #119
    FlapadarV2's Avatar
    December 2010
    1,802 Posts


    Edited:

    Code:
    Timer Error: [lua\includes\extensions\string.lua:146] attempt to index local 's' (a nil value)
    Timer Error: [lua\includes\extensions\string.lua:146] attempt to index local 's' (a nil value)
    Timer Error: [lua\includes\extensions\string.lua:146] attempt to index local 's' (a nil value)
    Timer Error: [lua\includes\extensions\string.lua:146] attempt to index local 's' (a nil value)
    Timer Error: [lua\includes\extensions\string.lua:146] attempt to index local 's' (a nil value)
    Timer Error: [lua\includes\extensions\string.lua:146] attempt to index local 's' (a nil value)
    Timer Error: [lua\includes\extensions\string.lua:146] attempt to index local 's' (a nil value)
    Timer Error: [lua\includes\extensions\string.lua:146] attempt to index local 's' (a nil value)

  40. Post #120
    Zombiedance's Avatar
    June 2009
    243 Posts
    What is a good web server to use with sql lite pre installed?