Add __str__ methods to CModule, CUser, CChan, and CNick in modpython
This commit is contained in:
1 parent
23fb4df67a
commit
9db98d7cee
2 files changed
+23
No files matched your search
@@ -119,6 +119,9 @@ public:
|
||||
};
|
||||
|
||||
%extend CModule {
|
||||
CString __str__() {
|
||||
return $self->GetModName();
|
||||
}
|
||||
MCString_iter BeginNV_() {
|
||||
return MCString_iter($self->BeginNV());
|
||||
}
|
||||
@@ -142,6 +145,24 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
%extend CUser {
|
||||
CString __str__() {
|
||||
return $self->GetUserName();
|
||||
}
|
||||
};
|
||||
|
||||
%extend CChan {
|
||||
CString __str__() {
|
||||
return $self->GetName();
|
||||
}
|
||||
};
|
||||
|
||||
%extend CNick {
|
||||
CString __str__() {
|
||||
return $self->GetNick();
|
||||
}
|
||||
};
|
||||
|
||||
/* Web */
|
||||
|
||||
%template(StrPair) pair<CString, CString>;
|
||||
|
||||
Reference in new issue
Block a user