I suggest you surround your code with [ code] tags - it makes it easier to read.
Code:
void add_follower(struct char_data *ch, struct char_data *leader)
{
struct follow_type *k, *j;
struct char_data *l = leader;
if (ch->master) {
core_dump();
return;
}
ch->master = leader;
CREATE(k, struct follow_type, 1);
k->follower = ch;
k->next = NULL;
if (!l->followers) {
leader->followers = k;
} else {
j = l->followers;
while (j->next) {
j = j->next;
}
j->next = k;
}
act("You now follow $N.", FALSE, ch, 0, leader, TO_CHAR);
if (CAN_SEE(leader, ch))
act("$n starts following you.", TRUE, ch, 0, leader, TO_VICT);
act("$n starts to follow $N.", TRUE, ch, 0, leader, TO_NOTVICT);
}