Method code for $has_reactions.add_reaction()

[Turn on line numbering]
arg @args;
var r, id;

// make sure it doesn't already exist..
for r in (reactions || #[]) {
    if (r[2][2] == args[2]) {
        if (r[2] == args)
            return r[1];
    }
}
(> .check_reaction_args(@args) <);
reactions = dict_add(reactions || #[], ++last_id, args);

["// Created 23-Aug-1995 as a part of ColdCore, see: @help Credit"]

the Cold Dark