Method code for $robot.add_reaction()

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

// Make sure the sender is a writer, added by Sean
(> .perms(sender()) <);

// 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);

// $#Edited: 20 Feb 98 23:14 $user_sean

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

Method Ancestry Override:

 ----   91 $robot.add_reaction(@args)
 ----   76 $has_reactions.add_reaction(@args)

the Cold Dark