|
|
@@ -389,6 +389,7 @@ func (f *feedbagItem) read(r io.Reader) error {
|
|
|
FeedbagAttributesPdFlags: reflect.Uint32,
|
|
|
FeedbagAttributesPdMask: reflect.Uint32,
|
|
|
FeedbagAttributesPdMode: reflect.Uint8,
|
|
|
+ FeedbagAttributesNote: reflect.String,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -534,6 +535,18 @@ func ReceiveInsertItem(sm *SessionManager, sess *Session, fm *FeedbagStore, flap
|
|
|
}
|
|
|
return err
|
|
|
}
|
|
|
+ // don't let users block themselves, it causes the AIM client to go
|
|
|
+ // into a weird state.
|
|
|
+ if item.classID == 3 && item.name == sess.ScreenName {
|
|
|
+ snacFrameOut := snacFrame{
|
|
|
+ foodGroup: FEEDBAG,
|
|
|
+ subGroup: FeedbagErr,
|
|
|
+ }
|
|
|
+ snacPayloadOut := &snacError{
|
|
|
+ code: ErrorCodeNotSupportedByHost,
|
|
|
+ }
|
|
|
+ return writeOutSNAC(snac, flap, snacFrameOut, snacPayloadOut, sequence, w)
|
|
|
+ }
|
|
|
feedbag = append(feedbag, item)
|
|
|
snacPayloadOut.results = append(snacPayloadOut.results, 0x0000) // success by default
|
|
|
fmt.Printf("ReceiveInsertItem read SNAC feedbag item: %+v\n", item)
|