This repository has been archived by the owner on Jul 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Redis Structure IRC
Leroux Cifer edited this page Jul 10, 2012
·
2 revisions
Required:
- Redis connection (via phpredis found at https://github.com/nicolasff/phpredis)
(Managed by bot, viewed on site)
Key: usersOnline
Type: set
Value: List of users in public channels, with all user mode symbols
stripped. This needs to be deleted or cleared and updated
frequently. Every ping (90 seconds) is acceptable.
$namesReply = $irc->names($channel);
$redis->del('usersOnline');
foreach ($namesReply as $nick) {
$redis->sAdd('usersOnline', $nick);
}
(Added by bot, viewed and managed on site)
Key: linkReqs_{username}
Type: set
Value: List of linkable IRC nicks.
$redis->sAdd('linkReqs_' . $username, $nick);
(Managed on site)
- Quick to find all nicks from username.
- Quick to find username from one nick.
Key: userNicks_(username)
Type: set
Value: List of IRC nicks
Key: nick2User_(nick)
Type: string
Value: (username);(registration time as unix timestamp)