mirror of
https://github.com/anope/anope.git
synced 2026-06-26 15:36:38 +02:00
Fix unserializing badwords to not add dupes when unserializing an existing bw object
This commit is contained in:
@@ -138,7 +138,8 @@ Serializable* BadWordImpl::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
bw->type = static_cast<BadWordType>(n);
|
||||
|
||||
BadWordsImpl *bws = ci->Require<BadWordsImpl>("badwords");
|
||||
bws->badwords->push_back(bw);
|
||||
if (!obj)
|
||||
bws->badwords->push_back(bw);
|
||||
|
||||
return bw;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user