quassel_nick_hashing-2.patch
src/uisupport/uistyle.cpp | ||
---|---|---|
690 | 690 |
return _senderHash; |
691 | 691 | |
692 | 692 |
QString nick = nickFromMask(sender()).toLower(); |
693 |
if(!nick.isEmpty()) { |
|
694 |
int chopCount = 0; |
|
695 |
while(nick.at(nick.count() - 1 - chopCount) == '_') |
|
696 |
chopCount++; |
|
697 |
nick.chop(chopCount); |
|
698 |
} |
|
693 |
nick.truncate(nick.indexOf(QRegExp("_+$"), 1)); |
|
699 | 694 |
quint16 hash = qChecksum(nick.toAscii().data(), nick.toAscii().size()); |
700 | 695 |
return (_senderHash = (hash & 0xf) + 1); |
701 | 696 |
} |