zer0-one / praetor Goto Github PK
View Code? Open in Web Editor NEWA free and open source IRC bot, designed to be robust, portable, and easily extensible
A free and open source IRC bot, designed to be robust, portable, and easily extensible
Modify the inet
API to allow for forcing a particular address family. The user should be able to force IPv4 or IPv6, even when the option would fail.
https://github.com/Zer0-One/praetor/blob/master/src/util/hashtable.c#L122-L132
void* htable_lookup(struct htable* table, void* key, size_t key_len){
size_t index = (hash(key, key_len) % table->bucket_count);
struct htable_data* entry = &table->bucket_array[index];
while(entry != 0){
if(entry->key == key){
return entry->value;
}
entry = entry->next;
}
return NULL;
}
The hash table doesn't store the actual indexing key with its mapped value, it only stores a pointer to the key, and then uses this pointer to resolve collisions using a linear search. This will cause unexpected behaviour when a user tries to look up a value using the same key stored at a different address.
When irc_msg_send()
is called with a message length greater than MSG_SIZE_MAX
, praetor should optionally split the message into as many as needed to send the entire message.
Or, we can defer this to the caller. Not sure yet.
No need to make it more specific until "network" becomes ambiguous.
The Makefile should include a target for release/debug static builds.
If praetor can't connect to any IRC networks, then it can't be issued commands via IRC to attempt more connects and reconnects.
If it fails to connect to any networks on startup, should the daemon exit, or should we define some kind of retry behavior? This sounds like it should be user-configurable. Maybe add an option to the config?
Correct the Makefile so that it rebuilds when a header is modified.
02:38 <+iphy> Does [add] replace the old entry when one exists?
02:39 <+iphy> Does it do so by allocating, or does it modify the existing bucket?
02:39 <+iphy> I.e. in oom situations, can I still replace existing values?
02:39 <+iphy> What comparator is used?
02:43 <+iphy> What happens if load threshold is negative or 0 or above 1?
02:49 <+iphy> The hash function is not specific to add, so it should be specified in the hash table docs, not in the add docs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.