Skip to content

Instantly share code, notes, and snippets.

HarpyWar

Block or report user

Report or block HarpyWar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@HarpyWar
HarpyWar / Murmur.cs
Created May 19, 2017
Murmur.ice 1.3.0 autogenerated slice for C#
View Murmur.cs
This file has been truncated, but you can view the full file.
// **********************************************************************
//
// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
@HarpyWar
HarpyWar / sock.c
Last active May 27, 2018
wine-2.0.1/server/sock.c for D2GS
View sock.c
/*
* Server-side socket management
*
* Copyright (C) 1999 Marcus Meissner, Ove Kåven
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
@HarpyWar
HarpyWar / gameplayers
Last active Aug 29, 2015
MySQL trigger for Ghost table 'gameplayers' and PvPGN table 'pvpgn_bnet'. It adds leave count for players.
View gameplayers
/* Increase acct_leave count +1 when new ROW inserted into table `gameplayers`, if player left time less then game duration -5 munutes */
DELIMITER $$
CREATE
TRIGGER `leaver_trigger` BEFORE INSERT
ON `gameplayers`
FOR EACH ROW BEGIN
IF ( NEW.left < (SELECT duration FROM games WHERE games.id = NEW.gameid) - 60*5 ) THEN
UPDATE pvpgn_bnet SET pvpgn_bnet.acct_leave = pvpgn_bnet.acct_leave + 1 WHERE LOWER(NEW.name) = LOWER(pvpgn_bnet.username);
END IF;
@HarpyWar
HarpyWar / clan.c
Created Oct 18, 2012
Clan tag is case-sensitive in 1.8.5 and case-insensitive in 1.99
View clan.c
extern t_clan *clanlist_find_clan_by_clantag(int clantag)
{
t_elem *curr;
t_clan *clan;
if (clantag == 0)
return NULL;
if (clanlist_head)
{
LIST_TRAVERSE(clanlist_head, curr)
View gist:1723831
bbcodeParser.htmlToBBCode doesn't work with complex tags.
For instance:
bbcodeParser.addBBCode('[quote={TEXT1}]{TEXT2}[/quote]', '<div class=quote><cite>{TEXT1}</cite><p>{TEXT2}</p></div>');
var bbcode = bbcodeParser.htmlToBBCode('<div class=quote><cite>Author</cite><p>My message</p></div>');
It returns the same HTML string, but not BB code string.
You can’t perform that action at this time.